Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: src/core/SkPictureShader.cpp

Issue 808703006: remove view matrix from context (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: one more fix Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/core/SkPictureShader.h ('k') | src/core/SkShader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkPictureShader.h" 8 #include "SkPictureShader.h"
9 9
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 fPicture ? fPicture->cullRect().fBottom : 0); 283 fPicture ? fPicture->cullRect().fBottom : 0);
284 284
285 str->appendf("(%s, %s)", gTileModeName[fTmx], gTileModeName[fTmy]); 285 str->appendf("(%s, %s)", gTileModeName[fTmx], gTileModeName[fTmy]);
286 286
287 this->INHERITED::toString(str); 287 this->INHERITED::toString(str);
288 } 288 }
289 #endif 289 #endif
290 290
291 #if SK_SUPPORT_GPU 291 #if SK_SUPPORT_GPU
292 bool SkPictureShader::asFragmentProcessor(GrContext* context, const SkPaint& pai nt, 292 bool SkPictureShader::asFragmentProcessor(GrContext* context, const SkPaint& pai nt,
293 const SkMatrix* localMatrix, GrColor* paintColor, 293 const SkMatrix& viewM, const SkMatrix* localMatrix,
294 GrColor* paintColor,
294 GrFragmentProcessor** fp) const { 295 GrFragmentProcessor** fp) const {
295 SkAutoTUnref<SkShader> bitmapShader(this->refBitmapShader(context->getMatrix (), localMatrix)); 296 SkAutoTUnref<SkShader> bitmapShader(this->refBitmapShader(viewM, localMatrix ));
296 if (!bitmapShader) { 297 if (!bitmapShader) {
297 return false; 298 return false;
298 } 299 }
299 return bitmapShader->asFragmentProcessor(context, paint, NULL, paintColor, f p); 300 return bitmapShader->asFragmentProcessor(context, paint, viewM, NULL, paintC olor, fp);
300 } 301 }
301 #else 302 #else
302 bool SkPictureShader::asFragmentProcessor(GrContext*, const SkPaint&, const SkMa trix*, GrColor*, 303 bool SkPictureShader::asFragmentProcessor(GrContext*, const SkPaint&, const SkMa trix&,
304 const SkMatrix*, GrColor*,
303 GrFragmentProcessor**) const { 305 GrFragmentProcessor**) const {
304 SkDEBUGFAIL("Should not call in GPU-less build"); 306 SkDEBUGFAIL("Should not call in GPU-less build");
305 return false; 307 return false;
306 } 308 }
307 #endif 309 #endif
OLDNEW
« no previous file with comments | « src/core/SkPictureShader.h ('k') | src/core/SkShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698