| 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 "web_compositor_impl.h" | 7 #include "web_compositor_impl.h" | 
| 8 | 8 | 
| 9 #ifdef LOG | 9 #ifdef LOG | 
| 10 #undef LOG | 10 #undef LOG | 
| (...skipping 20 matching lines...) Expand all  Loading... | 
| 31 } | 31 } | 
| 32 | 32 | 
| 33 bool WebCompositor::isThreadingEnabled() | 33 bool WebCompositor::isThreadingEnabled() | 
| 34 { | 34 { | 
| 35     return WebCompositorImpl::isThreadingEnabled(); | 35     return WebCompositorImpl::isThreadingEnabled(); | 
| 36 } | 36 } | 
| 37 | 37 | 
| 38 void WebCompositor::shutdown() | 38 void WebCompositor::shutdown() | 
| 39 { | 39 { | 
| 40     WebCompositorImpl::shutdown(); | 40     WebCompositorImpl::shutdown(); | 
| 41     CCSettings::reset(); |  | 
| 42 } |  | 
| 43 |  | 
| 44 void WebCompositor::setPerTilePaintingEnabled(bool enabled) |  | 
| 45 { |  | 
| 46     ASSERT(!WebCompositorImpl::initialized()); |  | 
| 47     CCSettings::setPerTilePaintingEnabled(enabled); |  | 
| 48 } |  | 
| 49 |  | 
| 50 void WebCompositor::setPartialSwapEnabled(bool enabled) |  | 
| 51 { |  | 
| 52     ASSERT(!WebCompositorImpl::initialized()); |  | 
| 53     CCSettings::setPartialSwapEnabled(enabled); |  | 
| 54 } |  | 
| 55 |  | 
| 56 void WebCompositor::setAcceleratedAnimationEnabled(bool enabled) |  | 
| 57 { |  | 
| 58     ASSERT(!WebCompositorImpl::initialized()); |  | 
| 59     CCSettings::setAcceleratedAnimationEnabled(enabled); |  | 
| 60 } |  | 
| 61 |  | 
| 62 void WebCompositor::setPageScalePinchZoomEnabled(bool enabled) |  | 
| 63 { |  | 
| 64     ASSERT(!WebCompositorImpl::initialized()); |  | 
| 65     CCSettings::setPageScalePinchZoomEnabled(enabled); |  | 
| 66 } | 41 } | 
| 67 | 42 | 
| 68 void WebCompositorImpl::initialize(WebThread* implThread) | 43 void WebCompositorImpl::initialize(WebThread* implThread) | 
| 69 { | 44 { | 
| 70     ASSERT(!s_initialized); | 45     ASSERT(!s_initialized); | 
| 71     s_initialized = true; | 46     s_initialized = true; | 
| 72 | 47 | 
| 73     s_mainThread = CCThreadImpl::createForCurrentThread().release(); | 48     s_mainThread = CCThreadImpl::createForCurrentThread().release(); | 
| 74     CCProxy::setMainThread(s_mainThread); | 49     CCProxy::setMainThread(s_mainThread); | 
| 75     if (implThread) { | 50     if (implThread) { | 
| (...skipping 23 matching lines...) Expand all  Loading... | 
| 99         s_implThread = 0; | 74         s_implThread = 0; | 
| 100     } | 75     } | 
| 101     delete s_mainThread; | 76     delete s_mainThread; | 
| 102     s_mainThread = 0; | 77     s_mainThread = 0; | 
| 103     CCProxy::setImplThread(0); | 78     CCProxy::setImplThread(0); | 
| 104     CCProxy::setMainThread(0); | 79     CCProxy::setMainThread(0); | 
| 105     s_initialized = false; | 80     s_initialized = false; | 
| 106 } | 81 } | 
| 107 | 82 | 
| 108 } | 83 } | 
| OLD | NEW | 
|---|