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

Unified 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: nullptr Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: src/core/SkPictureShader.cpp
diff --git a/src/core/SkPictureShader.cpp b/src/core/SkPictureShader.cpp
index 0b3c9e864bf9830b103e1839db7b4395ff1806ac..f3ac6380250cc9c519106f0acf6db6c6b5f01933 100644
--- a/src/core/SkPictureShader.cpp
+++ b/src/core/SkPictureShader.cpp
@@ -336,27 +336,17 @@ void SkPictureShader::toString(SkString* str) const {
#endif
#if SK_SUPPORT_GPU
-bool SkPictureShader::asFragmentProcessor(GrContext* context, const SkPaint& paint,
- const SkMatrix& viewM, const SkMatrix* localMatrix,
- GrColor* paintColor,
- GrProcessorDataManager* procDataManager,
- GrFragmentProcessor** fp) const {
+const GrFragmentProcessor* SkPictureShader::asFragmentProcessor(GrContext* context,
robertphillips 2015/08/28 21:33:05 tabs ?
bsalomon 2015/08/29 01:42:50 Done.
+ const SkMatrix& viewM, const SkMatrix* localMatrix, SkFilterQuality fq,
+ GrProcessorDataManager* procDataManager) const {
int maxTextureSize = 0;
if (context) {
maxTextureSize = context->caps()->maxTextureSize();
}
SkAutoTUnref<SkShader> bitmapShader(this->refBitmapShader(viewM, localMatrix, maxTextureSize));
if (!bitmapShader) {
- return false;
+ return nullptr;
}
- return bitmapShader->asFragmentProcessor(context, paint, viewM, nullptr, paintColor,
- procDataManager, fp);
-}
-#else
-bool SkPictureShader::asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix&,
- const SkMatrix*, GrColor*, GrProcessorDataManager*,
- GrFragmentProcessor**) const {
- SkDEBUGFAIL("Should not call in GPU-less build");
- return false;
+ return bitmapShader->asFragmentProcessor(context, viewM, nullptr, fq, procDataManager);
}
#endif

Powered by Google App Engine
This is Rietveld 408576698