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

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

Issue 11142031: Remove WTF dependencies from webkit_compositor_bindings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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"
10 #include "CCProxy.h"
11 #include "CCSettings.h"
12 #include "CCThreadImpl.h"
13 #include <public/Platform.h>
14 #include <wtf/ThreadingPrimitives.h>
15
16 #ifdef LOG 9 #ifdef LOG
17 #undef LOG 10 #undef LOG
18 #endif 11 #endif
19 #include "base/message_loop_proxy.h" 12 #include "base/message_loop_proxy.h"
13 #include "cc/layer_tree_host.h"
14 #include "cc/proxy.h"
15 #include "cc/settings.h"
16 #include "third_party/WebKit/Source/Platform/chromium/public/Platform.h"
20 #include "webkit/glue/webthread_impl.h" 17 #include "webkit/glue/webthread_impl.h"
18 #include "CCThreadImpl.h"
21 19
22 using namespace cc; 20 using namespace cc;
23 21
24 namespace WebKit { 22 namespace WebKit {
25 23
26 bool WebCompositorImpl::s_initialized = false; 24 bool WebCompositorImpl::s_initialized = false;
27 CCThread* WebCompositorImpl::s_mainThread = 0; 25 CCThread* WebCompositorImpl::s_mainThread = 0;
28 CCThread* WebCompositorImpl::s_implThread = 0; 26 CCThread* WebCompositorImpl::s_implThread = 0;
29 27
30 void WebCompositor::initialize(WebThread* implThread) 28 void WebCompositor::initialize(WebThread* implThread)
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 { 63 {
66 ASSERT(!WebCompositorImpl::initialized()); 64 ASSERT(!WebCompositorImpl::initialized());
67 CCSettings::setPageScalePinchZoomEnabled(enabled); 65 CCSettings::setPageScalePinchZoomEnabled(enabled);
68 } 66 }
69 67
70 void WebCompositorImpl::initialize(WebThread* implThread) 68 void WebCompositorImpl::initialize(WebThread* implThread)
71 { 69 {
72 ASSERT(!s_initialized); 70 ASSERT(!s_initialized);
73 s_initialized = true; 71 s_initialized = true;
74 72
75 s_mainThread = CCThreadImpl::createForCurrentThread().leakPtr(); 73 s_mainThread = CCThreadImpl::createForCurrentThread().release();
76 CCProxy::setMainThread(s_mainThread); 74 CCProxy::setMainThread(s_mainThread);
77 if (implThread) { 75 if (implThread) {
78 s_implThread = CCThreadImpl::createForDifferentThread(implThread).leakPt r(); 76 s_implThread = CCThreadImpl::createForDifferentThread(implThread).releas e();
79 CCProxy::setImplThread(s_implThread); 77 CCProxy::setImplThread(s_implThread);
80 } else 78 } else
81 CCProxy::setImplThread(0); 79 CCProxy::setImplThread(0);
82 } 80 }
83 81
84 bool WebCompositorImpl::isThreadingEnabled() 82 bool WebCompositorImpl::isThreadingEnabled()
85 { 83 {
86 return s_implThread; 84 return s_implThread;
87 } 85 }
88 86
(...skipping 12 matching lines...) Expand all
101 s_implThread = 0; 99 s_implThread = 0;
102 } 100 }
103 delete s_mainThread; 101 delete s_mainThread;
104 s_mainThread = 0; 102 s_mainThread = 0;
105 CCProxy::setImplThread(0); 103 CCProxy::setImplThread(0);
106 CCProxy::setMainThread(0); 104 CCProxy::setMainThread(0);
107 s_initialized = false; 105 s_initialized = false;
108 } 106 }
109 107
110 } 108 }
OLDNEW
« no previous file with comments | « webkit/compositor_bindings/WebCompositorImpl.h ('k') | webkit/compositor_bindings/WebCompositorInputHandlerImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698