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

Side by Side Diff: webkit/compositor_bindings/WebCompositorImpl.cpp

Issue 10916279: Chromium compositor change implementing page-scale driven pinch-zoom. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Rebaselined to 160422. 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 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 "config.h" 5 #include "config.h"
6 6
7 #include "WebCompositorImpl.h" 7 #include "WebCompositorImpl.h"
8 8
9 #include "CCLayerTreeHost.h" 9 #include "CCLayerTreeHost.h"
10 #include "CCProxy.h" 10 #include "CCProxy.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 ASSERT(!WebCompositorImpl::initialized()); 56 ASSERT(!WebCompositorImpl::initialized());
57 CCSettings::setPartialSwapEnabled(enabled); 57 CCSettings::setPartialSwapEnabled(enabled);
58 } 58 }
59 59
60 void WebCompositor::setAcceleratedAnimationEnabled(bool enabled) 60 void WebCompositor::setAcceleratedAnimationEnabled(bool enabled)
61 { 61 {
62 ASSERT(!WebCompositorImpl::initialized()); 62 ASSERT(!WebCompositorImpl::initialized());
63 CCSettings::setAcceleratedAnimationEnabled(enabled); 63 CCSettings::setAcceleratedAnimationEnabled(enabled);
64 } 64 }
65 65
66 void WebCompositor::setPageScalePinchZoomEnabled(bool enabled)
67 {
68 ASSERT(!WebCompositorImpl::initialized());
69 CCSettings::setPageScalePinchZoomEnabled(enabled);
70 }
71
66 void WebCompositorImpl::initialize(WebThread* implThread) 72 void WebCompositorImpl::initialize(WebThread* implThread)
67 { 73 {
68 ASSERT(!s_initialized); 74 ASSERT(!s_initialized);
69 s_initialized = true; 75 s_initialized = true;
70 76
71 s_mainThread = CCThreadImpl::createForCurrentThread().leakPtr(); 77 s_mainThread = CCThreadImpl::createForCurrentThread().leakPtr();
72 CCProxy::setMainThread(s_mainThread); 78 CCProxy::setMainThread(s_mainThread);
73 if (implThread) { 79 if (implThread) {
74 s_implThread = CCThreadImpl::createForDifferentThread(implThread).leakPt r(); 80 s_implThread = CCThreadImpl::createForDifferentThread(implThread).leakPt r();
75 CCProxy::setImplThread(s_implThread); 81 CCProxy::setImplThread(s_implThread);
(...skipping 21 matching lines...) Expand all
97 s_implThread = 0; 103 s_implThread = 0;
98 } 104 }
99 delete s_mainThread; 105 delete s_mainThread;
100 s_mainThread = 0; 106 s_mainThread = 0;
101 CCProxy::setImplThread(0); 107 CCProxy::setImplThread(0);
102 CCProxy::setMainThread(0); 108 CCProxy::setMainThread(0);
103 s_initialized = false; 109 s_initialized = false;
104 } 110 }
105 111
106 } 112 }
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | webkit/compositor_bindings/web_compositor_support_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698