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

Side by Side Diff: ui/compositor/compositor.cc

Issue 11410098: ui: Enable debug borders for the UI compositor through layer tree settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « no previous file | ui/compositor/layer.h » ('j') | ui/compositor/layer.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/compositor/compositor.h" 5 #include "ui/compositor/compositor.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 WebKit::Platform::current()->compositorSupport(); 298 WebKit::Platform::current()->compositorSupport();
299 root_web_layer_.reset(compositor_support->createLayer()); 299 root_web_layer_.reset(compositor_support->createLayer());
300 WebKit::WebLayerTreeView::Settings settings; 300 WebKit::WebLayerTreeView::Settings settings;
301 CommandLine* command_line = CommandLine::ForCurrentProcess(); 301 CommandLine* command_line = CommandLine::ForCurrentProcess();
302 settings.showFPSCounter = 302 settings.showFPSCounter =
303 command_line->HasSwitch(switches::kUIShowFPSCounter); 303 command_line->HasSwitch(switches::kUIShowFPSCounter);
304 settings.showPlatformLayerTree = 304 settings.showPlatformLayerTree =
305 command_line->HasSwitch(switches::kUIShowLayerTree); 305 command_line->HasSwitch(switches::kUIShowLayerTree);
306 settings.refreshRate = 306 settings.refreshRate =
307 test_compositor_enabled ? kTestRefreshRate : kDefaultRefreshRate; 307 test_compositor_enabled ? kTestRefreshRate : kDefaultRefreshRate;
308 settings.showDebugBorders =
309 command_line->HasSwitch(switches::kUIShowLayerBorders);
308 310
309 root_web_layer_->setAnchorPoint(WebKit::WebFloatPoint(0.f, 0.f)); 311 root_web_layer_->setAnchorPoint(WebKit::WebFloatPoint(0.f, 0.f));
310 host_.reset(compositor_support->createLayerTreeView(this, *root_web_layer_, 312 host_.reset(compositor_support->createLayerTreeView(this, *root_web_layer_,
311 settings)); 313 settings));
312 host_->setSurfaceReady(); 314 host_->setSurfaceReady();
313 } 315 }
314 316
315 Compositor::~Compositor() { 317 Compositor::~Compositor() {
316 CancelCompositorLock(); 318 CancelCompositorLock();
317 DCHECK(!compositor_lock_); 319 DCHECK(!compositor_lock_);
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 578
577 COMPOSITOR_EXPORT void DisableTestCompositor() { 579 COMPOSITOR_EXPORT void DisableTestCompositor() {
578 test_compositor_enabled = false; 580 test_compositor_enabled = false;
579 } 581 }
580 582
581 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() { 583 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() {
582 return test_compositor_enabled; 584 return test_compositor_enabled;
583 } 585 }
584 586
585 } // namespace ui 587 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | ui/compositor/layer.h » ('j') | ui/compositor/layer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698