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

Unified Diff: src/gpu/GrDistanceFieldTextContext.cpp

Issue 551463004: introduce Props to surface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: address comments from 23 and 24 Created 6 years, 3 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
Index: src/gpu/GrDistanceFieldTextContext.cpp
diff --git a/src/gpu/GrDistanceFieldTextContext.cpp b/src/gpu/GrDistanceFieldTextContext.cpp
index 18058be17f01924bafe0c363a6448fb0c770267e..09717213d8ad4a9eebb9e66cc36fe8a5a0c737ad 100755
--- a/src/gpu/GrDistanceFieldTextContext.cpp
+++ b/src/gpu/GrDistanceFieldTextContext.cpp
@@ -131,8 +131,7 @@ void GrDistanceFieldTextContext::setupCoverageEffect(const SkColor& filteredColo
flags |= fUseLCDText ? kUseLCD_DistanceFieldEffectFlag : 0;
flags |= fUseLCDText && fTextMatrix.rectStaysRect() ?
kRectToRect_DistanceFieldEffectFlag : 0;
- bool useBGR = SkDeviceProperties::Geometry::kBGR_Layout ==
- fDeviceProperties.fGeometry.getLayout();
+ bool useBGR = fDeviceProperties.useBGR();
flags |= fUseLCDText && useBGR ? kBGR_DistanceFieldEffectFlag : 0;
// see if we need to create a new effect
@@ -149,7 +148,7 @@ void GrDistanceFieldTextContext::setupCoverageEffect(const SkColor& filteredColo
flags));
} else {
#ifdef SK_GAMMA_APPLY_TO_A8
- U8CPU lum = SkColorSpaceLuminance::computeLuminance(fDeviceProperties.fGamma,
+ U8CPU lum = SkColorSpaceLuminance::computeLuminance(fDeviceProperties.getGamma(),
filteredColor);
fCachedEffect.reset(GrDistanceFieldTextureEffect::Create(fCurrTexture,
params,
@@ -500,8 +499,8 @@ static void setup_gamma_texture(GrContext* context, const SkGlyphCache* cache,
#else
SkScalar contrast = 0.5f;
#endif
- SkScalar paintGamma = deviceProperties.fGamma;
- SkScalar deviceGamma = deviceProperties.fGamma;
+ SkScalar paintGamma = deviceProperties.getGamma();
+ SkScalar deviceGamma = deviceProperties.getGamma();
size = SkScalerContext::GetGammaLUTSize(contrast, paintGamma, deviceGamma,
&width, &height);

Powered by Google App Engine
This is Rietveld 408576698