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

Unified Diff: include/core/SkPaint.h

Issue 1711223003: Only use fake gamma with linear devices. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Formatting. Created 4 years, 10 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 cd170bc94f9f8fb209305e1232c1cfd449554ed9..482483f43a9f99677b2682af8d0ba0d61105a181 100644
--- a/include/core/SkPaint.h
+++ b/include/core/SkPaint.h
@@ -1072,19 +1072,24 @@ private:
SkScalar measure_text(SkGlyphCache*, const char* text, size_t length,
int* count, SkRect* bounds) const;
+ enum class FakeGamma {
+ Off = 0, On
+ };
+
/*
* Allocs an SkDescriptor on the heap and return it to the caller as a refcnted
* SkData. Caller is responsible for managing the lifetime of this object.
*/
void getScalerContextDescriptor(SkAutoDescriptor*, const SkSurfaceProps& surfaceProps,
- const SkMatrix*, bool ignoreGamma) const;
+ FakeGamma fakeGamma, const SkMatrix*) const;
- SkGlyphCache* detachCache(const SkSurfaceProps* surfaceProps, const SkMatrix*,
- bool ignoreGamma) const;
+ SkGlyphCache* detachCache(const SkSurfaceProps* surfaceProps, FakeGamma fakeGamma,
+ const SkMatrix*) const;
- void descriptorProc(const SkSurfaceProps* surfaceProps, const SkMatrix* deviceMatrix,
+ void descriptorProc(const SkSurfaceProps* surfaceProps, FakeGamma fakeGamma,
+ const SkMatrix* deviceMatrix,
void (*proc)(SkTypeface*, const SkDescriptor*, void*),
- void* context, bool ignoreGamma) const;
+ void* context) const;
/*
* The luminance color is used to determine which Gamma Canonical color to map to. This is
« 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