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

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: rebase fix Created 7 years, 6 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 | « cc/resources/picture.h ('k') | cc/resources/picture_layer_tiling.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture.cc
diff --git a/cc/resources/picture.cc b/cc/resources/picture.cc
index 6d3ae60d0c4fdc655e1391986198360a672ae295..bc081c9632bb59bc52403bd77cbbb762a86f0d18 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;
- }
-};
-
} // namespace
scoped_refptr<Picture> Picture::Create(gfx::Rect layer_rect) {
@@ -312,24 +300,16 @@ void Picture::Raster(
SkCanvas* canvas,
SkDrawPictureCallback* callback,
gfx::Rect content_rect,
- float contents_scale,
- bool enable_lcd_text) {
+ float contents_scale) {
TRACE_EVENT_BEGIN1("cc", "Picture::Raster",
"data", AsTraceableRasterData(content_rect, contents_scale));
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);
« no previous file with comments | « cc/resources/picture.h ('k') | cc/resources/picture_layer_tiling.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698