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

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: fixed unit tests Created 8 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 unified diff | Download patch | Annotate | Revision Log
« cc/tiled_layer_unittest.cc ('K') | « cc/tiled_layer_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 "config.h" 5 #include "config.h"
6 #include "web_content_layer_impl.h" 6 #include "web_content_layer_impl.h"
7 7
8 #include "SkMatrix44.h" 8 #include "SkMatrix44.h"
9 #include "cc/content_layer.h" 9 #include "cc/content_layer.h"
10 #include "third_party/WebKit/Source/Platform/chromium/public/WebContentLayerClie nt.h" 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebContentLayerClie nt.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 return m_layer->layer()->boundsContainPageScale(); 54 return m_layer->layer()->boundsContainPageScale();
55 } 55 }
56 56
57 void WebContentLayerImpl::setAutomaticallyComputeRasterScale(bool automatic) 57 void WebContentLayerImpl::setAutomaticallyComputeRasterScale(bool automatic)
58 { 58 {
59 m_layer->layer()->setAutomaticallyComputeRasterScale(automatic); 59 m_layer->layer()->setAutomaticallyComputeRasterScale(automatic);
60 } 60 }
61 61
62 void WebContentLayerImpl::setUseLCDText(bool enable) 62 void WebContentLayerImpl::setUseLCDText(bool enable)
63 { 63 {
64 m_layer->layer()->setUseLCDText(enable); 64 m_layer->layer()->setCanUseLCDText(enable);
65 } 65 }
66 66
67 void WebContentLayerImpl::setDrawCheckerboardForMissingTiles(bool enable) 67 void WebContentLayerImpl::setDrawCheckerboardForMissingTiles(bool enable)
68 { 68 {
69 m_layer->layer()->setDrawCheckerboardForMissingTiles(enable); 69 m_layer->layer()->setDrawCheckerboardForMissingTiles(enable);
70 } 70 }
71 71
72 72
73 void WebContentLayerImpl::paintContents(SkCanvas* canvas, const gfx::Rect& clip, gfx::RectF& opaque) 73 void WebContentLayerImpl::paintContents(SkCanvas* canvas, const gfx::Rect& clip, gfx::RectF& opaque)
74 { 74 {
75 if (!m_client) 75 if (!m_client)
76 return; 76 return;
77 WebFloatRect webOpaque; 77 WebFloatRect webOpaque;
78 m_client->paintContents(canvas, 78 m_client->paintContents(canvas,
79 clip, 79 clip,
80 #if WEBCONTENTLAYERCLIENT_HAS_CANPAINTLCDTEXT 80 #if WEBCONTENTLAYERCLIENT_HAS_CANPAINTLCDTEXT
81 m_layer->layer()->useLCDText(), 81 m_layer->layer()->canUseLCDText(),
82 #endif // WEBCONTENTLAYERCLIENT_HAS_CANPAINTLCDTEXT 82 #endif // WEBCONTENTLAYERCLIENT_HAS_CANPAINTLCDTEXT
83 webOpaque); 83 webOpaque);
84 opaque = webOpaque; 84 opaque = webOpaque;
85 } 85 }
86 86
87 } // namespace WebKit 87 } // namespace WebKit
OLDNEW
« cc/tiled_layer_unittest.cc ('K') | « cc/tiled_layer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698