aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/glsl/GrGLSLPrimitiveProcessor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/glsl/GrGLSLPrimitiveProcessor.cpp')
-rw-r--r--src/gpu/glsl/GrGLSLPrimitiveProcessor.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gpu/glsl/GrGLSLPrimitiveProcessor.cpp b/src/gpu/glsl/GrGLSLPrimitiveProcessor.cpp
index 24f21ffe7a..f39fff2a07 100644
--- a/src/gpu/glsl/GrGLSLPrimitiveProcessor.cpp
+++ b/src/gpu/glsl/GrGLSLPrimitiveProcessor.cpp
@@ -16,6 +16,11 @@ SkMatrix GrGLSLPrimitiveProcessor::GetTransformMatrix(const SkMatrix& localMatri
const GrCoordTransform& coordTransform) {
SkMatrix combined;
combined.setConcat(coordTransform.getMatrix(), localMatrix);
+ if (coordTransform.normalize()) {
+ SkASSERT(coordTransform.texture());
+ combined.postIDiv(coordTransform.texture()->width(), coordTransform.texture()->height());
+ }
+
if (coordTransform.reverseY()) {
// combined.postScale(1,-1);
// combined.postTranslate(0,1);