aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrAtlasTextContext.cpp
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@google.com>2015-04-28 09:17:05 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-04-28 09:17:05 -0700
commit50cb76b2bb0ffa607a1409f77be0ae7d64e31436 (patch)
treeaf55e571828da1a7353457451bafab547079fa1f /src/gpu/GrAtlasTextContext.cpp
parentef292a0901205b9785a30daae2c036aa34a970ca (diff)
Revert of removing equality / compute invariant loops from GrGeometryProcessors (patchset #2 id:20001 of https://codereview.chromium.org/1111603004/)
Reason for revert: breaks gl programs Original issue's description: > removing equality / compute invariant loops from GrGeometryProcessors > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/ef292a0901205b9785a30daae2c036aa34a970ca TBR=bsalomon@google.com,joshualitt@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1110993002
Diffstat (limited to 'src/gpu/GrAtlasTextContext.cpp')
-rw-r--r--src/gpu/GrAtlasTextContext.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gpu/GrAtlasTextContext.cpp b/src/gpu/GrAtlasTextContext.cpp
index 59b018e7b5..dee3be7635 100644
--- a/src/gpu/GrAtlasTextContext.cpp
+++ b/src/gpu/GrAtlasTextContext.cpp
@@ -1494,10 +1494,14 @@ public:
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));
}
@@ -1960,6 +1964,7 @@ private:
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];
@@ -1968,13 +1973,15 @@ private:
texture,
params,
correction,
- flags);
+ flags,
+ opaque);
#else
return GrDistanceFieldA8TextGeoProc::Create(color,
viewMatrix,
texture,
params,
- flags);
+ flags,
+ opaque);
#endif
}