From 36df063528551974b74dee1bf2cf8ea1e1824792 Mon Sep 17 00:00:00 2001 From: "alokp@chromium.org" Date: Thu, 12 Jun 2014 20:26:15 +0000 Subject: Record SkPicture with correct LCD text setting. We used to always recorded with LCD ON and if needed disabled it with an SkFilter during rasterization. This is wasteful on platforms where LCD text is always disabled. This patch records SkPicture with correct setting. One downside to this approach is that we would need to invalidate and record anytime the LCD text setting changes. But since this can only happen once for a layer (all future changes are ignored), this is not going to be a big performance issue. On the positive side, this patch will simplify a lot of things on the rasterization front - no SkDrawFilter, or LCD text tile versions, or a special rasterization mode for disable LCD. BUG=368513 Review URL: https://codereview.chromium.org/315393002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276785 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/renderer/compositor_bindings/web_content_layer_impl.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'webkit') diff --git a/webkit/renderer/compositor_bindings/web_content_layer_impl.cc b/webkit/renderer/compositor_bindings/web_content_layer_impl.cc index fb15a61..96799e6 100644 --- a/webkit/renderer/compositor_bindings/web_content_layer_impl.cc +++ b/webkit/renderer/compositor_bindings/web_content_layer_impl.cc @@ -55,13 +55,10 @@ void WebContentLayerImpl::PaintContents( return; blink::WebFloatRect web_opaque; - // For picture layers, always record with LCD text. PictureLayerImpl - // will turn this off later during rasterization. - bool use_lcd_text = WebLayerImpl::UsingPictureLayer() || can_use_lcd_text_; client_->paintContents( canvas, clip, - use_lcd_text, + can_use_lcd_text_, web_opaque, graphics_context_status == ContentLayerClient::GRAPHICS_CONTEXT_ENABLED ? blink::WebContentLayerClient::GraphicsContextEnabled -- cgit v1.1