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

Unified Diff: include/gpu/GrEffectStage.h

Issue 551253004: Changes to remove program effects builder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | include/gpu/GrShaderVar.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrEffectStage.h
diff --git a/include/gpu/GrEffectStage.h b/include/gpu/GrEffectStage.h
index 6df7f90d6334a6d965151d36fa6e4f492c1347fc..b42d309d4b24c91e893a308a684c613c53a73a07 100644
--- a/include/gpu/GrEffectStage.h
+++ b/include/gpu/GrEffectStage.h
@@ -12,6 +12,7 @@
#define GrEffectStage_DEFINED
#include "GrBackendEffectFactory.h"
+#include "GrCoordTransform.h"
#include "GrEffect.h"
#include "GrProgramElementRef.h"
#include "SkMatrix.h"
@@ -128,6 +129,23 @@ public:
}
}
+ bool isPerspectiveCoordTransform(int matrixIndex, bool useExplicitLocalCoords) const {
+ const GrCoordTransform& coordTransform = this->getEffect()->coordTransform(matrixIndex);
+ SkMatrix::TypeMask type0 = coordTransform.getMatrix().getType();
+ SkMatrix::TypeMask type1 = SkMatrix::kIdentity_Mask;
+ if (kLocal_GrCoordSet == coordTransform.sourceCoords()) {
+ type1 = useExplicitLocalCoords ?
+ SkMatrix::kIdentity_Mask : this->getCoordChangeMatrix().getType();
+ }
+
+ int combinedTypes = type0 | type1;
+ if (SkMatrix::kPerspective_Mask & combinedTypes) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
const GrEffect* getEffect() const { return fEffect.get(); }
void convertToPendingExec() { fEffect.convertToPendingExec(); }
« no previous file with comments | « no previous file | include/gpu/GrShaderVar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698