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

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

Issue 11418259: cc: Toggling paint rects with the WebLayerTreeView::setShowPaintRects() API (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to 170991 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
« no previous file with comments | « webkit/compositor_bindings/web_layer_tree_view_impl.h ('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_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
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
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
OLDNEW
« no previous file with comments | « webkit/compositor_bindings/web_layer_tree_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698