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

Unified Diff: src/gpu/gl/GrGLProgramEffects.cpp

Issue 438053002: Don't compare coord change matrices to determine effect compatibility when using explicit local coo… (Closed) Base URL: https://skia.googlesource.com/skia.git@nomat
Patch Set: Add comment Created 6 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 | « src/gpu/GrDrawState.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLProgramEffects.cpp
diff --git a/src/gpu/gl/GrGLProgramEffects.cpp b/src/gpu/gl/GrGLProgramEffects.cpp
index cff31e29c26e6ebbbea1c3c49425378fe38ed383..3fa4f15ac80f13fe55de0be6b18155f3b607f3ad 100644
--- a/src/gpu/gl/GrGLProgramEffects.cpp
+++ b/src/gpu/gl/GrGLProgramEffects.cpp
@@ -90,8 +90,11 @@ GrCoordSet get_source_coords(uint32_t transformKey, int transformIdx) {
SkMatrix get_transform_matrix(const GrDrawEffect& drawEffect, int transformIdx) {
const GrCoordTransform& coordTransform = drawEffect.effect()->coordTransform(transformIdx);
SkMatrix combined;
- if (kLocal_GrCoordSet == coordTransform.sourceCoords() &&
- !drawEffect.programHasExplicitLocalCoords()) {
+
+ if (kLocal_GrCoordSet == coordTransform.sourceCoords()) {
+ // If we have explicit local coords then we shouldn't need a coord change.
+ SkASSERT(!drawEffect.programHasExplicitLocalCoords() ||
+ drawEffect.getCoordChangeMatrix().isIdentity());
combined.setConcat(coordTransform.getMatrix(), drawEffect.getCoordChangeMatrix());
} else {
combined = coordTransform.getMatrix();
« no previous file with comments | « src/gpu/GrDrawState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698