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

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

Issue 1316513002: Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor* (Closed) Base URL: https://skia.googlesource.com/skia.git@things
Patch Set: Address comments, fix roll(?) Created 5 years, 3 months 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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 fPicture ? fPicture->cullRect().fRight : 0, 329 fPicture ? fPicture->cullRect().fRight : 0,
330 fPicture ? fPicture->cullRect().fBottom : 0); 330 fPicture ? fPicture->cullRect().fBottom : 0);
331 331
332 str->appendf("(%s, %s)", gTileModeName[fTmx], gTileModeName[fTmy]); 332 str->appendf("(%s, %s)", gTileModeName[fTmx], gTileModeName[fTmy]);
333 333
334 this->INHERITED::toString(str); 334 this->INHERITED::toString(str);
335 } 335 }
336 #endif 336 #endif
337 337
338 #if SK_SUPPORT_GPU 338 #if SK_SUPPORT_GPU
339 bool SkPictureShader::asFragmentProcessor(GrContext* context, const SkPaint& pai nt, 339 const GrFragmentProcessor* SkPictureShader::asFragmentProcessor(
340 const SkMatrix& viewM, const SkMatrix* localMatrix, 340 GrContext* context,
341 GrColor* paintColor, 341 const SkMatrix& viewM,
342 GrProcessorDataManager* procDataManage r, 342 const SkMatrix* localMatrix,
343 GrFragmentProcessor** fp) const { 343 SkFilterQuality fq,
344 GrProcessorDataManager* proc DataManager) const {
344 int maxTextureSize = 0; 345 int maxTextureSize = 0;
345 if (context) { 346 if (context) {
346 maxTextureSize = context->caps()->maxTextureSize(); 347 maxTextureSize = context->caps()->maxTextureSize();
347 } 348 }
348 SkAutoTUnref<SkShader> bitmapShader(this->refBitmapShader(viewM, localMatrix , maxTextureSize)); 349 SkAutoTUnref<SkShader> bitmapShader(this->refBitmapShader(viewM, localMatrix , maxTextureSize));
349 if (!bitmapShader) { 350 if (!bitmapShader) {
350 return false; 351 return nullptr;
351 } 352 }
352 return bitmapShader->asFragmentProcessor(context, paint, viewM, nullptr, pai ntColor, 353 return bitmapShader->asFragmentProcessor(context, viewM, nullptr, fq, procDa taManager);
353 procDataManager, fp);
354 }
355 #else
356 bool SkPictureShader::asFragmentProcessor(GrContext*, const SkPaint&, const SkMa trix&,
357 const SkMatrix*, GrColor*, GrProcessor DataManager*,
358 GrFragmentProcessor**) const {
359 SkDEBUGFAIL("Should not call in GPU-less build");
360 return false;
361 } 354 }
362 #endif 355 #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