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

Unified Diff: src/gpu/GrDistanceFieldTextContext.cpp

Issue 446953002: Add an opaqueness hint to GrDrawState. (Closed) Base URL: https://skia.googlesource.com/skia.git@greg
Patch Set: Address comments 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/GrContext.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 4321ff17efc534bd8b476823776506394cf4e7eb..b7b4f9903f1fdeba7f63fe62ec802c4ff4fec610 100755
--- a/src/gpu/GrDistanceFieldTextContext.cpp
+++ b/src/gpu/GrDistanceFieldTextContext.cpp
@@ -421,6 +421,9 @@ HAS_ATLAS:
SkFixedToFloat(texture->normalizeFixedY(ty + th)),
vertSize);
if (useColorVerts) {
+ if (0xFF == GrColorUnpackA(fPaint.getColor())) {
+ fDrawTarget->drawState()->setHint(GrDrawState::kVertexColorsAreOpaque_Hint, true);
+ }
// color comes after position.
GrColor* colors = reinterpret_cast<GrColor*>(positions + 1);
for (int i = 0; i < 4; ++i) {
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrDrawState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698