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

Unified Diff: src/core/SkLocalMatrixShader.h

Issue 2041113004: sk_sp for gpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Reserve correctly. Created 4 years, 6 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 | « src/core/SkLightingShader.cpp ('k') | src/core/SkLocalMatrixShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkLocalMatrixShader.h
diff --git a/src/core/SkLocalMatrixShader.h b/src/core/SkLocalMatrixShader.h
index 3d590e43e60563d24924a75fc297c1bb01da1b8d..ea784190b4742737e422a7eb4e057bfb09172e15 100644
--- a/src/core/SkLocalMatrixShader.h
+++ b/src/core/SkLocalMatrixShader.h
@@ -12,6 +12,8 @@
#include "SkReadBuffer.h"
#include "SkWriteBuffer.h"
+class GrFragmentProcessor;
+
class SkLocalMatrixShader : public SkShader {
public:
SkLocalMatrixShader(SkShader* proxy, const SkMatrix& localMatrix)
@@ -24,16 +26,10 @@ public:
}
#if SK_SUPPORT_GPU
- const GrFragmentProcessor* asFragmentProcessor(
+ sk_sp<GrFragmentProcessor> asFragmentProcessor(
GrContext* context, const SkMatrix& viewM,
const SkMatrix* localMatrix, SkFilterQuality fq,
- SkSourceGammaTreatment gammaTreatment) const override {
- SkMatrix tmp = this->getLocalMatrix();
- if (localMatrix) {
- tmp.preConcat(*localMatrix);
- }
- return fProxyShader->asFragmentProcessor(context, viewM, &tmp, fq, gammaTreatment);
- }
+ SkSourceGammaTreatment gammaTreatment) const override;
#endif
SkShader* refAsALocalMatrixShader(SkMatrix* localMatrix) const override {
« no previous file with comments | « src/core/SkLightingShader.cpp ('k') | src/core/SkLocalMatrixShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698