OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |