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

Unified Diff: include/core/SkPaint.h

Issue 193163003: Enable use of distance fields via SkPaint flag. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Change HACK to TEMP Created 6 years, 9 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 | « gyp/gpu.gypi ('k') | src/core/SkPaint.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 7d553ec8e0cd5a219e69a0652fa3f79fb5ec38a9..2b30a7cda5d5950084804280c03217a5103ae20a 100644
--- a/include/core/SkPaint.h
+++ b/include/core/SkPaint.h
@@ -118,6 +118,8 @@ public:
kAutoHinting_Flag = 0x800, //!< mask to force Freetype's autohinter
kVerticalText_Flag = 0x1000,
kGenA8FromLCD_Flag = 0x2000, // hack for GDI -- do not use if you can help it
+ kDistanceFieldTextTEMP_Flag = 0x4000, //!< TEMPORARY mask to enable distance fields
+ // currently overrides LCD and subpixel rendering
// when adding extra flags, note that the fFlags member is specified
// with a bit-width and you'll have to expand it.
@@ -284,6 +286,19 @@ public:
*/
void setDevKernText(bool devKernText);
+ /** Helper for getFlags(), returns true if kDistanceFieldTextTEMP_Flag bit is set
+ @return true if the distanceFieldText bit is set in the paint's flags.
+ */
+ bool isDistanceFieldTextTEMP() const {
+ return SkToBool(this->getFlags() & kDistanceFieldTextTEMP_Flag);
+ }
+
+ /** Helper for setFlags(), setting or clearing the kDistanceFieldTextTEMP_Flag bit
+ @param distanceFieldText true to set the kDistanceFieldTextTEMP_Flag bit in the paint's
+ flags, false to clear it.
+ */
+ void setDistanceFieldTextTEMP(bool distanceFieldText);
+
enum FilterLevel {
kNone_FilterLevel,
kLow_FilterLevel,
@@ -1063,7 +1078,6 @@ private:
uint32_t fDirtyBits;
-
SkDrawCacheProc getDrawCacheProc() const;
SkMeasureCacheProc getMeasureCacheProc(TextBufferDirection dir,
bool needFullMetrics) const;
« no previous file with comments | « gyp/gpu.gypi ('k') | src/core/SkPaint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698