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

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

Issue 11189037: toggle FPS counter in compositor (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: removed hasFontAtlas methods, put DCHECKs in HUDLayerImpl 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
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 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/threading/thread_restrictions.h" 10 #include "base/threading/thread_restrictions.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 swap_posted_(false), 140 swap_posted_(false),
141 device_scale_factor_(0.0f), 141 device_scale_factor_(0.0f),
142 last_started_frame_(0), 142 last_started_frame_(0),
143 last_ended_frame_(0), 143 last_ended_frame_(0),
144 disable_schedule_composite_(false) { 144 disable_schedule_composite_(false) {
145 WebKit::WebCompositorSupport* compositor_support = 145 WebKit::WebCompositorSupport* compositor_support =
146 WebKit::Platform::current()->compositorSupport(); 146 WebKit::Platform::current()->compositorSupport();
147 root_web_layer_.reset(compositor_support->createLayer()); 147 root_web_layer_.reset(compositor_support->createLayer());
148 WebKit::WebLayerTreeView::Settings settings; 148 WebKit::WebLayerTreeView::Settings settings;
149 CommandLine* command_line = CommandLine::ForCurrentProcess(); 149 CommandLine* command_line = CommandLine::ForCurrentProcess();
150 settings.showFPSCounter =
enne (OOO) 2012/10/29 17:58:57 Won't this break the --ui-show-fps-counter flag, s
egraether 2012/10/30 00:03:57 I did not realize that this was a different flag w
enne (OOO) 2012/10/30 16:09:45 It's for Aura builds, which has a separate composi
egraether 2012/10/30 16:41:34 And how is the fontAtlas loaded in that case?
egraether 2012/10/30 20:14:04 It isn't and that caused some problems. I removed
151 command_line->HasSwitch(switches::kUIShowFPSCounter);
152 settings.showPlatformLayerTree = 150 settings.showPlatformLayerTree =
153 command_line->HasSwitch(switches::kUIShowLayerTree); 151 command_line->HasSwitch(switches::kUIShowLayerTree);
154 settings.refreshRate = 152 settings.refreshRate =
155 test_compositor_enabled ? kTestRefreshRate : kDefaultRefreshRate; 153 test_compositor_enabled ? kTestRefreshRate : kDefaultRefreshRate;
156 154
157 root_web_layer_->setAnchorPoint(WebKit::WebFloatPoint(0.f, 0.f)); 155 root_web_layer_->setAnchorPoint(WebKit::WebFloatPoint(0.f, 0.f));
158 host_.reset(compositor_support->createLayerTreeView(this, *root_web_layer_, 156 host_.reset(compositor_support->createLayerTreeView(this, *root_web_layer_,
159 settings)); 157 settings));
160 host_->setSurfaceReady(); 158 host_->setSurfaceReady();
161 } 159 }
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 433
436 COMPOSITOR_EXPORT void DisableTestCompositor() { 434 COMPOSITOR_EXPORT void DisableTestCompositor() {
437 test_compositor_enabled = false; 435 test_compositor_enabled = false;
438 } 436 }
439 437
440 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() { 438 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() {
441 return test_compositor_enabled; 439 return test_compositor_enabled;
442 } 440 }
443 441
444 } // namespace ui 442 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698