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

Side by Side Diff: webkit/compositor_bindings/web_content_layer_impl.cc

Issue 11360093: Mark layers that can use LCD text based on layer transform and opacity. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reverted whitespace change Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/occlusion_tracker_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "web_content_layer_impl.h" 5 #include "web_content_layer_impl.h"
6 6
7 #include "SkMatrix44.h" 7 #include "SkMatrix44.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "cc/content_layer.h" 9 #include "cc/content_layer.h"
10 #include "cc/picture_layer.h" 10 #include "cc/picture_layer.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 bool WebContentLayerImpl::boundsContainPageScale() const 65 bool WebContentLayerImpl::boundsContainPageScale() const
66 { 66 {
67 return m_layer->layer()->boundsContainPageScale(); 67 return m_layer->layer()->boundsContainPageScale();
68 } 68 }
69 69
70 void WebContentLayerImpl::setAutomaticallyComputeRasterScale(bool automatic) 70 void WebContentLayerImpl::setAutomaticallyComputeRasterScale(bool automatic)
71 { 71 {
72 m_layer->layer()->setAutomaticallyComputeRasterScale(automatic); 72 m_layer->layer()->setAutomaticallyComputeRasterScale(automatic);
73 } 73 }
74 74
75 // TODO(alokp): Remove this function from WebContentLayer API.
75 void WebContentLayerImpl::setUseLCDText(bool enable) 76 void WebContentLayerImpl::setUseLCDText(bool enable)
76 { 77 {
77 m_layer->layer()->setUseLCDText(enable);
78 } 78 }
79 79
80 void WebContentLayerImpl::setDrawCheckerboardForMissingTiles(bool enable) 80 void WebContentLayerImpl::setDrawCheckerboardForMissingTiles(bool enable)
81 { 81 {
82 m_layer->layer()->setDrawCheckerboardForMissingTiles(enable); 82 m_layer->layer()->setDrawCheckerboardForMissingTiles(enable);
83 } 83 }
84 84
85 85
86 void WebContentLayerImpl::paintContents(SkCanvas* canvas, const gfx::Rect& clip, gfx::RectF& opaque) 86 void WebContentLayerImpl::paintContents(SkCanvas* canvas, const gfx::Rect& clip, gfx::RectF& opaque)
87 { 87 {
88 if (!m_client) 88 if (!m_client)
89 return; 89 return;
90
91 bool useLCDText = usingPictureLayer() ?
92 false :
93 static_cast<ContentLayer*>(m_layer->layer())->useLCDText();
90 WebFloatRect webOpaque; 94 WebFloatRect webOpaque;
91 m_client->paintContents(canvas, 95 m_client->paintContents(canvas,
92 clip, 96 clip,
93 #if WEBCONTENTLAYERCLIENT_HAS_CANPAINTLCDTEXT 97 #if WEBCONTENTLAYERCLIENT_HAS_CANPAINTLCDTEXT
94 m_layer->layer()->useLCDText(), 98 useLCDText,
95 #endif // WEBCONTENTLAYERCLIENT_HAS_CANPAINTLCDTEXT 99 #endif // WEBCONTENTLAYERCLIENT_HAS_CANPAINTLCDTEXT
96 webOpaque); 100 webOpaque);
97 opaque = webOpaque; 101 opaque = webOpaque;
98 } 102 }
99 103
100 } // namespace WebKit 104 } // namespace WebKit
OLDNEW
« no previous file with comments | « cc/occlusion_tracker_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698