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

Unified Diff: gm/dcshader.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
« no previous file with comments | « no previous file | gyp/gpu.gypi » ('j') | include/core/SkShader.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/dcshader.cpp
diff --git a/gm/dcshader.cpp b/gm/dcshader.cpp
index 3eee43d1474cb058c336bdf770550cd870049cc7..28c811de222bfa285e41dcc3dea62a52fd056d47 100644
--- a/gm/dcshader.cpp
+++ b/gm/dcshader.cpp
@@ -10,6 +10,7 @@
#if SK_SUPPORT_GPU
#include "GrFragmentProcessor.h"
#include "GrCoordTransform.h"
+#include "effects/GrExtractAlphaFragmentProcessor.h"
#include "gl/GrGLProcessor.h"
#include "gl/builders/GrGLProgramBuilder.h"
#include "Resources.h"
@@ -33,9 +34,8 @@ public:
buf.writeMatrix(fDeviceMatrix);
}
- bool asFragmentProcessor(GrContext*, const SkPaint& paint, const SkMatrix& viewM,
- const SkMatrix* localMatrix, GrColor* color, GrProcessorDataManager*,
- GrFragmentProcessor** fp) const override;
+ const GrFragmentProcessor* asFragmentProcessor(GrContext*, const SkMatrix& viewM,
robertphillips 2015/08/28 21:33:05 indent ?
bsalomon 2015/08/29 01:42:50 Done.
+ const SkMatrix* localMatrix, SkFilterQuality, GrProcessorDataManager*) const override;
#ifndef SK_IGNORE_TO_STRING
void toString(SkString* str) const override {
@@ -94,13 +94,10 @@ private:
GrCoordTransform fDeviceTransform;
};
-bool DCShader::asFragmentProcessor(GrContext*, const SkPaint& paint, const SkMatrix& viewM,
- const SkMatrix* localMatrix, GrColor* color,
- GrProcessorDataManager* procDataManager,
- GrFragmentProcessor** fp) const {
- *fp = new DCFP(procDataManager, fDeviceMatrix);
- *color = GrColorPackA4(paint.getAlpha());
- return true;
+const GrFragmentProcessor* DCShader::asFragmentProcessor(GrContext*, const SkMatrix& viewM,
robertphillips 2015/08/28 21:33:05 indent ?
bsalomon 2015/08/29 01:42:49 Done.
+ const SkMatrix* localMatrix, SkFilterQuality, GrProcessorDataManager* procDataManager) const {
+ SkAutoTUnref<const GrFragmentProcessor> inner(new DCFP(procDataManager, fDeviceMatrix));
+ return GrExtractAlphaFragmentProcessor::Create(inner);
}
class DCShaderGM : public GM {
« no previous file with comments | « no previous file | gyp/gpu.gypi » ('j') | include/core/SkShader.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698