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

Unified Diff: src/core/SkLocalMatrixShader.cpp

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/SkLocalMatrixShader.h ('k') | src/core/SkModeColorFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkLocalMatrixShader.cpp
diff --git a/src/core/SkLocalMatrixShader.cpp b/src/core/SkLocalMatrixShader.cpp
index ea4db5352c3f7708baef81d5a767e8c0ca126232..cb85019827d62bb713962d6f32bcb8a5d2f9e4e4 100644
--- a/src/core/SkLocalMatrixShader.cpp
+++ b/src/core/SkLocalMatrixShader.cpp
@@ -7,6 +7,23 @@
#include "SkLocalMatrixShader.h"
+#if SK_SUPPORT_GPU
+#include "GrFragmentProcessor.h"
+#endif
+
+#if SK_SUPPORT_GPU
+sk_sp<GrFragmentProcessor> SkLocalMatrixShader::asFragmentProcessor(
+ GrContext* context, const SkMatrix& viewM,
+ const SkMatrix* localMatrix, SkFilterQuality fq,
+ SkSourceGammaTreatment gammaTreatment) const {
+ SkMatrix tmp = this->getLocalMatrix();
+ if (localMatrix) {
+ tmp.preConcat(*localMatrix);
+ }
+ return fProxyShader->asFragmentProcessor(context, viewM, &tmp, fq, gammaTreatment);
+}
+#endif
+
sk_sp<SkFlattenable> SkLocalMatrixShader::CreateProc(SkReadBuffer& buffer) {
SkMatrix lm;
buffer.readMatrix(&lm);
« no previous file with comments | « src/core/SkLocalMatrixShader.h ('k') | src/core/SkModeColorFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698