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

Unified Diff: cc/resources/picture.cc

Issue 15995033: cc: Low quality support for low res tiles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 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: cc/resources/picture.cc
diff --git a/cc/resources/picture.cc b/cc/resources/picture.cc
index 47c08185b6b9aa0dd10301791398e2f7cdc30cf1..75d701cbc4e153fd1ddee298ece153fafd0354c8 100644
--- a/cc/resources/picture.cc
+++ b/cc/resources/picture.cc
@@ -80,18 +80,6 @@ bool DecodeBitmap(const void* buffer, size_t size, SkBitmap* bm) {
return false;
}
-class DisableLCDTextFilter : public SkDrawFilter {
- public:
- // SkDrawFilter interface.
- virtual bool filter(SkPaint* paint, SkDrawFilter::Type type) OVERRIDE {
- if (type != SkDrawFilter::kText_Type)
- return true;
-
- paint->setLCDRenderText(false);
- return true;
- }
-};
-
// URI label for a lazily decoded SkPixelRef.
const char kLabelLazyDecoded[] = "lazy";
@@ -351,17 +339,10 @@ void Picture::Raster(
DCHECK(picture_);
- skia::RefPtr<DisableLCDTextFilter> disable_lcd_text_filter;
-
canvas->save();
canvas->clipRect(gfx::RectToSkRect(content_rect));
canvas->scale(contents_scale, contents_scale);
canvas->translate(layer_rect_.x(), layer_rect_.y());
- // Pictures by default have LCD text enabled.
- if (!enable_lcd_text) {
- disable_lcd_text_filter = skia::AdoptRef(new DisableLCDTextFilter);
- canvas->setDrawFilter(disable_lcd_text_filter.get());
- }
picture_->draw(canvas, callback);
SkIRect bounds;
canvas->getClipDeviceBounds(&bounds);

Powered by Google App Engine
This is Rietveld 408576698