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

Unified Diff: src/core/SkTextBlob.cpp

Issue 1076593002: Start canonicalizing color for all A8 textblobs (Closed) Base URL: https://skia.googlesource.com/skia.git@atcachemasks
Patch Set: disabling Created 5 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: src/core/SkTextBlob.cpp
diff --git a/src/core/SkTextBlob.cpp b/src/core/SkTextBlob.cpp
index 3d396deba5cb4ce8fe84daeff52b64e369ddb0f4..3fb126bd84f2a4e9a80c6e84c1ffa1c6658cca18 100644
--- a/src/core/SkTextBlob.cpp
+++ b/src/core/SkTextBlob.cpp
@@ -47,6 +47,9 @@ public:
bool operator!=(const RunFont& other) const {
return !(*this == other);
}
+
+ uint32_t flags() const { return fFlags; }
+
private:
const static uint32_t kFlagsMask =
SkPaint::kAntiAlias_Flag |
@@ -343,6 +346,10 @@ void SkTextBlob::RunIterator::applyFontToPaint(SkPaint* paint) const {
fCurrentRun->font().applyToPaint(paint);
}
+bool SkTextBlob::RunIterator::hasLCD() const {
+ return SkToBool(fCurrentRun->font().flags() & SkPaint::kLCDRenderText_Flag);
+}
+
SkTextBlobBuilder::SkTextBlobBuilder()
: fStorageSize(0)
, fStorageUsed(0)

Powered by Google App Engine
This is Rietveld 408576698