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

Unified Diff: src/gpu/GrAtlasTextContext.cpp

Issue 1110993002: Revert of removing equality / compute invariant loops from GrGeometryProcessors (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanup1
Patch Set: Created 5 years, 8 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/GrAARectRenderer.cpp ('k') | src/gpu/GrDefaultGeoProcFactory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAtlasTextContext.cpp
diff --git a/src/gpu/GrAtlasTextContext.cpp b/src/gpu/GrAtlasTextContext.cpp
index cc9bde25fd67e0088cfefa0697126939c69bb883..c2c76edec31dbf0de21f7a940ed35ac07d4a975d 100644
--- a/src/gpu/GrAtlasTextContext.cpp
+++ b/src/gpu/GrAtlasTextContext.cpp
@@ -1493,10 +1493,14 @@
texture));
} else {
GrTextureParams params(SkShader::kClamp_TileMode, GrTextureParams::kNone_FilterMode);
+
+ // This will be ignored in the non A8 case
+ bool opaqueVertexColors = GrColorIsOpaque(this->color());
gp.reset(GrBitmapTextGeoProc::Create(this->color(),
texture,
params,
fMaskFormat,
+ opaqueVertexColors,
localMatrix));
}
@@ -1959,6 +1963,7 @@
flags);
} else {
flags |= kColorAttr_DistanceFieldEffectFlag;
+ bool opaque = GrColorIsOpaque(color);
#ifdef SK_GAMMA_APPLY_TO_A8
U8CPU lum = SkColorSpaceLuminance::computeLuminance(fGamma, filteredColor);
float correction = (*fDistanceAdjustTable)[lum >> kDistanceAdjustLumShift];
@@ -1967,13 +1972,15 @@
texture,
params,
correction,
- flags);
+ flags,
+ opaque);
#else
return GrDistanceFieldA8TextGeoProc::Create(color,
viewMatrix,
texture,
params,
- flags);
+ flags,
+ opaque);
#endif
}
« no previous file with comments | « src/gpu/GrAARectRenderer.cpp ('k') | src/gpu/GrDefaultGeoProcFactory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698