From 5192475bd8cb98e8e0c1192ab5ece7b8595701d6 Mon Sep 17 00:00:00 2001 From: brianosman Date: Mon, 12 Sep 2016 08:50:19 -0700 Subject: Two changes: 1. Remove special premul handling from gamut xform code Alpha is a constant, so the gamut transformation results remain unchanged (it distributes across the linear matrix multiply). 2. Use SkMatrix44 rather than array of floats Preserves semantic intention, and makes upcoming code (where we transform colors on the CPU by that matrix) simpler. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2329553002 Review-Url: https://codereview.chromium.org/2329553002 --- src/gpu/effects/GrBicubicEffect.cpp | 2 +- src/gpu/effects/GrSimpleTextureEffect.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gpu/effects') diff --git a/src/gpu/effects/GrBicubicEffect.cpp b/src/gpu/effects/GrBicubicEffect.cpp index 69fe906471..54c536a2a2 100644 --- a/src/gpu/effects/GrBicubicEffect.cpp +++ b/src/gpu/effects/GrBicubicEffect.cpp @@ -134,7 +134,7 @@ void GrGLBicubicEffect::onSetData(const GrGLSLProgramDataManager& pdman, pdman.setMatrix4f(fCoefficientsUni, bicubicEffect.coefficients()); fDomain.setData(pdman, bicubicEffect.domain(), texture.origin()); if (SkToBool(bicubicEffect.colorSpaceXform())) { - pdman.setMatrix4f(fColorSpaceXformUni, bicubicEffect.colorSpaceXform()->srcToDst()); + pdman.setSkMatrix44(fColorSpaceXformUni, bicubicEffect.colorSpaceXform()->srcToDst()); } } diff --git a/src/gpu/effects/GrSimpleTextureEffect.cpp b/src/gpu/effects/GrSimpleTextureEffect.cpp index 8e452814b9..b819cf3b81 100644 --- a/src/gpu/effects/GrSimpleTextureEffect.cpp +++ b/src/gpu/effects/GrSimpleTextureEffect.cpp @@ -40,7 +40,7 @@ protected: void onSetData(const GrGLSLProgramDataManager& pdman, const GrProcessor& processor) override { const GrSimpleTextureEffect& textureEffect = processor.cast(); if (SkToBool(textureEffect.colorSpaceXform())) { - pdman.setMatrix4f(fColorSpaceXformUni, textureEffect.colorSpaceXform()->srcToDst()); + pdman.setSkMatrix44(fColorSpaceXformUni, textureEffect.colorSpaceXform()->srcToDst()); } } -- cgit v1.2.3