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

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

Issue 1313573005: Revert of Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor* (Closed) Base URL: https://skia.googlesource.com/skia.git@things
Patch Set: 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 const GrFragmentProcessor* SkPictureShader::asFragmentProcessor(GrContext* conte xt, 339 bool SkPictureShader::asFragmentProcessor(GrContext* context, const SkPaint& pai nt,
340 const SkMatrix& viewM, const SkMatrix* localMatrix, SkFilterQuality fq, 340 const SkMatrix& viewM, const SkMatrix* localMatrix,
341 GrProcessorDataManager* procDataManager) const { 341 GrColor* paintColor,
342 GrProcessorDataManager* procDataManage r,
343 GrFragmentProcessor** fp) const {
342 int maxTextureSize = 0; 344 int maxTextureSize = 0;
343 if (context) { 345 if (context) {
344 maxTextureSize = context->caps()->maxTextureSize(); 346 maxTextureSize = context->caps()->maxTextureSize();
345 } 347 }
346 SkAutoTUnref<SkShader> bitmapShader(this->refBitmapShader(viewM, localMatrix , maxTextureSize)); 348 SkAutoTUnref<SkShader> bitmapShader(this->refBitmapShader(viewM, localMatrix , maxTextureSize));
347 if (!bitmapShader) { 349 if (!bitmapShader) {
348 return nullptr; 350 return false;
349 } 351 }
350 return bitmapShader->asFragmentProcessor(context, viewM, nullptr, fq, procDa taManager); 352 return bitmapShader->asFragmentProcessor(context, paint, viewM, nullptr, pai ntColor,
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;
351 } 361 }
352 #endif 362 #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