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

Unified Diff: src/core/SkPaint.cpp

Issue 1189223002: Remove gamma field from SkDeviceProperties (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Cleanup DistanceAdjustTable Created 5 years, 6 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/GrAtlasTextContext.h » ('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 c00dcc6b4f3bc1ecade57eec69f50a24b5e35225..9b2aa5e2906f73ad08e9178495ac203ea393fe4f 100644
--- a/src/core/SkPaint.cpp
+++ b/src/core/SkPaint.cpp
@@ -1463,18 +1463,12 @@ void SkScalerContext::MakeRec(const SkPaint& paint,
rec->setLuminanceColor(paint.computeLuminanceColor());
- if (NULL == deviceProperties) {
- rec->setDeviceGamma(SK_GAMMA_EXPONENT);
- rec->setPaintGamma(SK_GAMMA_EXPONENT);
- } else {
- 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->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->setDeviceGamma(SK_GAMMA_EXPONENT);
+ rec->setPaintGamma(SK_GAMMA_EXPONENT);
#ifdef SK_GAMMA_CONTRAST
rec->setContrast(SK_GAMMA_CONTRAST);
« no previous file with comments | « src/core/SkDeviceProperties.h ('k') | src/gpu/GrAtlasTextContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698