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

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: 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
Index: include/core/SkPaint.h
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h
index 57122550b3032df6afd74e1a82fb298a633ea6b7..ac7288de476ea2db0bd89af35b1e6cf711cceeb6 100644
--- a/include/core/SkPaint.h
+++ b/include/core/SkPaint.h
@@ -1085,8 +1085,13 @@ private:
SkScalar measure_text(SkGlyphCache*, const char* text, size_t length,
int* count, SkRect* bounds) const;
- enum class FakeGamma {
- Off = 0, On
+ enum FontWeightFlags {
bungeman-skia 2016/04/07 18:35:09 Eck... the name. I liked the term 'FakeGamma' beca
+ kNone_FontWeightFlag = 0,
+ kFakeGamma_FontWeightFlag = 1 << 0,
+ kBoostContrast_FontWeightFlag = 1 << 1,
+
+ kFakeGammaAndContrast_FontWeightFlag =
bungeman-skia 2016/04/07 18:35:09 nit: the name says flag... but it isn't really a f
+ kFakeGamma_FontWeightFlag | kBoostContrast_FontWeightFlag,
};
/*
@@ -1094,12 +1099,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 fontWeightFlags, const SkMatrix*) const;
- SkGlyphCache* detachCache(const SkSurfaceProps* surfaceProps, FakeGamma fakeGamma,
+ SkGlyphCache* detachCache(const SkSurfaceProps* surfaceProps, uint32_t fontWeightFlags,
const SkMatrix*) const;
- void descriptorProc(const SkSurfaceProps* surfaceProps, FakeGamma fakeGamma,
+ void descriptorProc(const SkSurfaceProps* surfaceProps, uint32_t fontWeightFlags,
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') | src/core/SkPaint.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698