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

Unified Diff: include/core/SkPaint.h

Issue 1866293003: Decouple contrast boost from fake gamma. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Improve ignorePreBlend API, add storage type to enum Created 4 years, 8 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 | « include/core/SkDraw.h ('k') | src/core/SkDraw.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPaint.h
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h
index 57122550b3032df6afd74e1a82fb298a633ea6b7..b2be5041f7f6a9c9d656ac43b0dcddb7df723a10 100644
--- a/include/core/SkPaint.h
+++ b/include/core/SkPaint.h
@@ -1085,8 +1085,14 @@ private:
SkScalar measure_text(SkGlyphCache*, const char* text, size_t length,
int* count, SkRect* bounds) const;
- enum class FakeGamma {
- Off = 0, On
+ enum ScalerContextFlags : uint32_t {
+ kNone_ScalerContextFlags = 0,
+
+ kFakeGamma_ScalerContextFlag = 1 << 0,
+ kBoostContrast_ScalerContextFlag = 1 << 1,
+
+ kFakeGammaAndBoostContrast_ScalerContextFlags =
+ kFakeGamma_ScalerContextFlag | kBoostContrast_ScalerContextFlag,
};
/*
@@ -1094,12 +1100,12 @@ private:
* SkData. Caller is responsible for managing the lifetime of this object.
*/
void getScalerContextDescriptor(SkAutoDescriptor*, const SkSurfaceProps& surfaceProps,
- FakeGamma fakeGamma, const SkMatrix*) const;
+ uint32_t scalerContextFlags, const SkMatrix*) const;
- SkGlyphCache* detachCache(const SkSurfaceProps* surfaceProps, FakeGamma fakeGamma,
+ SkGlyphCache* detachCache(const SkSurfaceProps* surfaceProps, uint32_t scalerContextFlags,
const SkMatrix*) const;
- void descriptorProc(const SkSurfaceProps* surfaceProps, FakeGamma fakeGamma,
+ void descriptorProc(const SkSurfaceProps* surfaceProps, uint32_t scalerContextFlags,
const SkMatrix* deviceMatrix,
void (*proc)(SkTypeface*, const SkDescriptor*, void*),
void* context) const;
« no previous file with comments | « include/core/SkDraw.h ('k') | src/core/SkDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698