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

Unified Diff: src/core/SkPaint.cpp

Issue 652273002: add gamma value to deviceproperties (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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/core/SkDeviceProperties.h ('k') | src/gpu/GrDistanceFieldTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPaint.cpp
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp
index a25ec1d333902ad6b194339c8f6cdfca4c10a0a0..2181a2574d7aba0bdde5cb11826cbe6818771613 100644
--- a/src/core/SkPaint.cpp
+++ b/src/core/SkPaint.cpp
@@ -1469,7 +1469,7 @@ void SkScalerContext::MakeRec(const SkPaint& paint,
flags |= SkScalerContext::kGenA8FromLCD_Flag;
} else {
SkPixelGeometry geometry = deviceProperties
- ? deviceProperties->fPixelGeometry
+ ? deviceProperties->pixelGeometry()
: SkSurfacePropsDefaultPixelGeometry();
switch (geometry) {
case kUnknown_SkPixelGeometry:
@@ -1520,13 +1520,13 @@ void SkScalerContext::MakeRec(const SkPaint& paint,
rec->setDeviceGamma(SK_GAMMA_EXPONENT);
rec->setPaintGamma(SK_GAMMA_EXPONENT);
} else {
- rec->setDeviceGamma(deviceProperties->getGamma());
+ rec->setDeviceGamma(deviceProperties->gamma());
//For now always set the paint gamma equal to the device gamma.
//The math in SkMaskGamma can handle them being different,
//but it requires superluminous masks when
//Ex : deviceGamma(x) < paintGamma(x) and x is sufficiently large.
- rec->setPaintGamma(deviceProperties->getGamma());
+ rec->setPaintGamma(deviceProperties->gamma());
}
#ifdef SK_GAMMA_CONTRAST
« no previous file with comments | « src/core/SkDeviceProperties.h ('k') | src/gpu/GrDistanceFieldTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698