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

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

Issue 10916279: Chromium compositor change implementing page-scale driven pinch-zoom. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Rebaseline to 160227. Created 8 years, 2 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
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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 179
180 void Compositor::Initialize(bool use_thread) { 180 void Compositor::Initialize(bool use_thread) {
181 CommandLine* command_line = CommandLine::ForCurrentProcess(); 181 CommandLine* command_line = CommandLine::ForCurrentProcess();
182 WebKit::WebCompositorSupport* compositor_support = 182 WebKit::WebCompositorSupport* compositor_support =
183 WebKit::Platform::current()->compositorSupport(); 183 WebKit::Platform::current()->compositorSupport();
184 // These settings must be applied before we initialize the compositor. 184 // These settings must be applied before we initialize the compositor.
185 compositor_support->setPartialSwapEnabled( 185 compositor_support->setPartialSwapEnabled(
186 command_line->HasSwitch(switches::kUIEnablePartialSwap)); 186 command_line->HasSwitch(switches::kUIEnablePartialSwap));
187 compositor_support->setPerTilePaintingEnabled( 187 compositor_support->setPerTilePaintingEnabled(
188 command_line->HasSwitch(switches::kUIEnablePerTilePainting)); 188 command_line->HasSwitch(switches::kUIEnablePerTilePainting));
189 compositor_support->setPageScalePinchZoomEnabled(
190 command_line->HasSwitch(switches::kEnablePinchInCompositor));
piman 2012/10/05 00:01:08 Do we really want to pinch-zoom the UI?
Jeff Timanus 2012/10/05 00:05:34 I'm not sure if I understand your question. This
piman 2012/10/05 00:25:51 This is the UI's compositor. Why are we doing anyt
Jeff Timanus 2012/10/05 15:37:50 Ah. It's possible that I did not understand the d
189 if (use_thread) 191 if (use_thread)
190 g_compositor_thread = new webkit_glue::WebThreadImpl("Browser Compositor"); 192 g_compositor_thread = new webkit_glue::WebThreadImpl("Browser Compositor");
191 compositor_support->initialize(g_compositor_thread); 193 compositor_support->initialize(g_compositor_thread);
192 } 194 }
193 195
194 void Compositor::Terminate() { 196 void Compositor::Terminate() {
195 WebKit::Platform::current()->compositorSupport()->shutdown(); 197 WebKit::Platform::current()->compositorSupport()->shutdown();
196 if (g_compositor_thread) { 198 if (g_compositor_thread) {
197 delete g_compositor_thread; 199 delete g_compositor_thread;
198 g_compositor_thread = NULL; 200 g_compositor_thread = NULL;
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 440
439 COMPOSITOR_EXPORT void DisableTestCompositor() { 441 COMPOSITOR_EXPORT void DisableTestCompositor() {
440 test_compositor_enabled = false; 442 test_compositor_enabled = false;
441 } 443 }
442 444
443 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() { 445 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() {
444 return test_compositor_enabled; 446 return test_compositor_enabled;
445 } 447 }
446 448
447 } // namespace ui 449 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698