OLD | NEW |
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_layer_tree_view_impl.h" | 5 #include "web_layer_tree_view_impl.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "cc/font_atlas.h" | 8 #include "cc/font_atlas.h" |
9 #include "cc/input_handler.h" | 9 #include "cc/input_handler.h" |
10 #include "cc/layer.h" | 10 #include "cc/layer.h" |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 &static_cast<WebRenderingStatsImpl&>(stats).rendering_stats); | 177 &static_cast<WebRenderingStatsImpl&>(stats).rendering_stats); |
178 } | 178 } |
179 | 179 |
180 void WebLayerTreeViewImpl::setShowFPSCounter(bool show) | 180 void WebLayerTreeViewImpl::setShowFPSCounter(bool show) |
181 { | 181 { |
182 LayerTreeDebugState debugState = m_layerTreeHost->debugState(); | 182 LayerTreeDebugState debugState = m_layerTreeHost->debugState(); |
183 debugState.showFPSCounter = show; | 183 debugState.showFPSCounter = show; |
184 m_layerTreeHost->setDebugState(debugState); | 184 m_layerTreeHost->setDebugState(debugState); |
185 } | 185 } |
186 | 186 |
| 187 void WebLayerTreeViewImpl::setShowPaintRects(bool show) |
| 188 { |
| 189 LayerTreeDebugState debugState = m_layerTreeHost->debugState(); |
| 190 debugState.showPaintRects = show; |
| 191 m_layerTreeHost->setDebugState(debugState); |
| 192 } |
| 193 |
187 scoped_ptr<FontAtlas> WebLayerTreeViewImpl::createFontAtlas() | 194 scoped_ptr<FontAtlas> WebLayerTreeViewImpl::createFontAtlas() |
188 { | 195 { |
189 int fontHeight; | 196 int fontHeight; |
190 WebRect asciiToWebRectTable[128]; | 197 WebRect asciiToWebRectTable[128]; |
191 gfx::Rect asciiToRectTable[128]; | 198 gfx::Rect asciiToRectTable[128]; |
192 SkBitmap bitmap; | 199 SkBitmap bitmap; |
193 | 200 |
194 m_client->createFontAtlas(bitmap, asciiToWebRectTable, fontHeight); | 201 m_client->createFontAtlas(bitmap, asciiToWebRectTable, fontHeight); |
195 | 202 |
196 for (int i = 0; i < 128; ++i) | 203 for (int i = 0; i < 128; ++i) |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 { | 274 { |
268 m_client->didCompleteSwapBuffers(); | 275 m_client->didCompleteSwapBuffers(); |
269 } | 276 } |
270 | 277 |
271 void WebLayerTreeViewImpl::scheduleComposite() | 278 void WebLayerTreeViewImpl::scheduleComposite() |
272 { | 279 { |
273 m_client->scheduleComposite(); | 280 m_client->scheduleComposite(); |
274 } | 281 } |
275 | 282 |
276 } // namespace WebKit | 283 } // namespace WebKit |
OLD | NEW |