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

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

Issue 9297006: Add per-tile painting support to compositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 10 months 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/gfx/compositor/compositor.gyp » ('j') | no next file with comments »
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/gfx/compositor/compositor.h" 5 #include "ui/gfx/compositor/compositor.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "third_party/skia/include/images/SkImageEncoder.h" 8 #include "third_party/skia/include/images/SkImageEncoder.h"
9 #include "third_party/skia/include/core/SkBitmap.h" 9 #include "third_party/skia/include/core/SkBitmap.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositor.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositor.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 WebKit::WebLayerTreeView::Settings settings; 129 WebKit::WebLayerTreeView::Settings settings;
130 CommandLine* command_line = CommandLine::ForCurrentProcess(); 130 CommandLine* command_line = CommandLine::ForCurrentProcess();
131 settings.showFPSCounter = 131 settings.showFPSCounter =
132 command_line->HasSwitch(switches::kUIShowFPSCounter); 132 command_line->HasSwitch(switches::kUIShowFPSCounter);
133 settings.showPlatformLayerTree = 133 settings.showPlatformLayerTree =
134 command_line->HasSwitch(switches::kUIShowLayerTree); 134 command_line->HasSwitch(switches::kUIShowLayerTree);
135 settings.refreshRate = test_compositor_enabled ? 135 settings.refreshRate = test_compositor_enabled ?
136 kTestRefreshRate : kDefaultRefreshRate; 136 kTestRefreshRate : kDefaultRefreshRate;
137 settings.partialSwapEnabled = 137 settings.partialSwapEnabled =
138 command_line->HasSwitch(switches::kUIEnablePartialSwap); 138 command_line->HasSwitch(switches::kUIEnablePartialSwap);
139 #if defined(PER_TILE_PAINTING)
140 settings.perTilePainting =
141 command_line->HasSwitch(switches::kUIEnablePerTilePainting);
142 #endif
139 143
140 host_ = WebKit::WebLayerTreeView::create(this, root_web_layer_, settings); 144 host_ = WebKit::WebLayerTreeView::create(this, root_web_layer_, settings);
141 root_web_layer_.setAnchorPoint(WebKit::WebFloatPoint(0.f, 0.f)); 145 root_web_layer_.setAnchorPoint(WebKit::WebFloatPoint(0.f, 0.f));
142 WidgetSizeChanged(size_); 146 WidgetSizeChanged(size_);
143 } 147 }
144 148
145 Compositor::~Compositor() { 149 Compositor::~Compositor() {
146 // There's a cycle between |root_web_layer_| and |host_|, which results in 150 // There's a cycle between |root_web_layer_| and |host_|, which results in
147 // leaking and/or crashing. Explicitly set the root layer to NULL so the cycle 151 // leaking and/or crashing. Explicitly set the root layer to NULL so the cycle
148 // is broken. 152 // is broken.
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 switches::kDisableTestCompositor)) { 324 switches::kDisableTestCompositor)) {
321 test_compositor_enabled = true; 325 test_compositor_enabled = true;
322 } 326 }
323 } 327 }
324 328
325 COMPOSITOR_EXPORT void DisableTestCompositor() { 329 COMPOSITOR_EXPORT void DisableTestCompositor() {
326 test_compositor_enabled = false; 330 test_compositor_enabled = false;
327 } 331 }
328 332
329 } // namespace ui 333 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/compositor/compositor.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698