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

Unified Diff: src/core/SkCanvas.cpp

Issue 718913003: Observe surface LCD settings in SkBaseDevice::drawTextBlob() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: adopting Mike's comment Created 6 years, 1 month 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/SkDevice.h ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 82d48160dce4ccf3227ca9e0f279cd18c6b2e723..6cd6dda322b943d65017af6be1f0243c4f2fa747 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -2055,12 +2055,10 @@ void SkCanvas::drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
class SkDeviceFilteredPaint {
public:
SkDeviceFilteredPaint(SkBaseDevice* device, const SkPaint& paint) {
- if (device->shouldDisableLCD(paint)) {
- uint32_t flags = paint.getFlags();
- flags &= ~SkPaint::kLCDRenderText_Flag;
- flags |= SkPaint::kGenA8FromLCD_Flag;
+ uint32_t filteredFlags = device->filterTextFlags(paint);
+ if (filteredFlags != paint.getFlags()) {
SkPaint* newPaint = fLazy.set(paint);
- newPaint->setFlags(flags);
+ newPaint->setFlags(filteredFlags);
fPaint = newPaint;
} else {
fPaint = &paint;
« no previous file with comments | « include/core/SkDevice.h ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698