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

Unified Diff: src/gpu/GrDistanceFieldTextContext.cpp

Issue 815553003: Move ViewMatrix off of drawstate (Closed) Base URL: https://skia.googlesource.com/skia.git@remove-fragment-stage
Patch Set: more cleaning Created 6 years 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/GrDefaultPathRenderer.cpp ('k') | src/gpu/GrDrawState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDistanceFieldTextContext.cpp
diff --git a/src/gpu/GrDistanceFieldTextContext.cpp b/src/gpu/GrDistanceFieldTextContext.cpp
index 8d993fa2039e116f4cca56ed9fd55e67131af6e4..69dcaa700ce0b59bc9e90b13da5a130f2eda2bf1 100755
--- a/src/gpu/GrDistanceFieldTextContext.cpp
+++ b/src/gpu/GrDistanceFieldTextContext.cpp
@@ -407,11 +407,13 @@ void GrDistanceFieldTextContext::setupCoverageEffect(const SkColor& filteredColo
// see if we need to create a new effect
if (textureUniqueID != fEffectTextureUniqueID ||
filteredColor != fEffectColor ||
- flags != fEffectFlags) {
+ flags != fEffectFlags ||
+ !fCachedGeometryProcessor->viewMatrix().cheapEqualTo(fViewMatrix)) {
GrColor color = fPaint.getColor();
if (fUseLCDText) {
GrColor colorNoPreMul = skcolor_to_grcolor_nopremultiply(filteredColor);
fCachedGeometryProcessor.reset(GrDistanceFieldLCDTextureEffect::Create(color,
+ fViewMatrix,
fCurrTexture,
params,
fGammaTexture,
@@ -425,6 +427,7 @@ void GrDistanceFieldTextContext::setupCoverageEffect(const SkColor& filteredColo
U8CPU lum = SkColorSpaceLuminance::computeLuminance(fDeviceProperties.gamma(),
filteredColor);
fCachedGeometryProcessor.reset(GrDistanceFieldTextureEffect::Create(color,
+ fViewMatrix,
fCurrTexture,
params,
fGammaTexture,
@@ -434,6 +437,7 @@ void GrDistanceFieldTextContext::setupCoverageEffect(const SkColor& filteredColo
opaque));
#else
fCachedGeometryProcessor.reset(GrDistanceFieldNoGammaTextureEffect::Create(color,
+ fViewMatrix,
fCurrTexture,
params,
flags,
@@ -633,7 +637,7 @@ void GrDistanceFieldTextContext::flush() {
if (fCurrVertex > 0) {
GrDrawState drawState;
- drawState.setFromPaint(fPaint, fViewMatrix, fContext->getRenderTarget());
+ drawState.setFromPaint(fPaint, fContext->getRenderTarget());
// setup our sampler state for our text texture/atlas
SkASSERT(SkIsAlign4(fCurrVertex));
« no previous file with comments | « src/gpu/GrDefaultPathRenderer.cpp ('k') | src/gpu/GrDrawState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698