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

Side by Side Diff: cc/CCSingleThreadProxy.cpp

Issue 11035071: [cc] Remove all WTF #includes from CCLayerTreeHost (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
« no previous file with comments | « cc/CCSingleThreadProxy.h ('k') | cc/CCTextureUpdateControllerTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "CCSingleThreadProxy.h" 7 #include "CCSingleThreadProxy.h"
8 8
9 #include "CCDrawQuad.h" 9 #include "CCDrawQuad.h"
10 #include "CCGraphicsContext.h" 10 #include "CCGraphicsContext.h"
11 #include "CCLayerTreeHost.h" 11 #include "CCLayerTreeHost.h"
12 #include "CCTextureUpdateController.h" 12 #include "CCTextureUpdateController.h"
13 #include "CCTimer.h" 13 #include "CCTimer.h"
14 #include "TraceEvent.h" 14 #include "TraceEvent.h"
15 #include <wtf/CurrentTime.h> 15 #include <wtf/CurrentTime.h>
16 16
17 using namespace WTF; 17 using namespace WTF;
18 18
19 namespace cc { 19 namespace cc {
20 20
21 PassOwnPtr<CCProxy> CCSingleThreadProxy::create(CCLayerTreeHost* layerTreeHost) 21 scoped_ptr<CCProxy> CCSingleThreadProxy::create(CCLayerTreeHost* layerTreeHost)
22 { 22 {
23 return adoptPtr(new CCSingleThreadProxy(layerTreeHost)); 23 return make_scoped_ptr(new CCSingleThreadProxy(layerTreeHost)).PassAs<CCProx y>();
24 } 24 }
25 25
26 CCSingleThreadProxy::CCSingleThreadProxy(CCLayerTreeHost* layerTreeHost) 26 CCSingleThreadProxy::CCSingleThreadProxy(CCLayerTreeHost* layerTreeHost)
27 : m_layerTreeHost(layerTreeHost) 27 : m_layerTreeHost(layerTreeHost)
28 , m_contextLost(false) 28 , m_contextLost(false)
29 , m_rendererInitialized(false) 29 , m_rendererInitialized(false)
30 , m_nextFrameIsNewlyCommittedFrame(false) 30 , m_nextFrameIsNewlyCommittedFrame(false)
31 , m_totalCommitCount(0) 31 , m_totalCommitCount(0)
32 { 32 {
33 TRACE_EVENT0("cc", "CCSingleThreadProxy::CCSingleThreadProxy"); 33 TRACE_EVENT0("cc", "CCSingleThreadProxy::CCSingleThreadProxy");
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 void CCSingleThreadProxy::setNeedsRedrawOnImplThread() 265 void CCSingleThreadProxy::setNeedsRedrawOnImplThread()
266 { 266 {
267 m_layerTreeHost->scheduleComposite(); 267 m_layerTreeHost->scheduleComposite();
268 } 268 }
269 269
270 void CCSingleThreadProxy::setNeedsCommitOnImplThread() 270 void CCSingleThreadProxy::setNeedsCommitOnImplThread()
271 { 271 {
272 m_layerTreeHost->scheduleComposite(); 272 m_layerTreeHost->scheduleComposite();
273 } 273 }
274 274
275 void CCSingleThreadProxy::postAnimationEventsToMainThreadOnImplThread(PassOwnPtr <CCAnimationEventsVector> events, double wallClockTime) 275 void CCSingleThreadProxy::postAnimationEventsToMainThreadOnImplThread(scoped_ptr <CCAnimationEventsVector> events, double wallClockTime)
276 { 276 {
277 ASSERT(CCProxy::isImplThread()); 277 ASSERT(CCProxy::isImplThread());
278 DebugScopedSetMainThread main; 278 DebugScopedSetMainThread main;
279 m_layerTreeHost->setAnimationEvents(events, wallClockTime); 279 m_layerTreeHost->setAnimationEvents(events.Pass(), wallClockTime);
280 } 280 }
281 281
282 void CCSingleThreadProxy::releaseContentsTexturesOnImplThread() 282 void CCSingleThreadProxy::releaseContentsTexturesOnImplThread()
283 { 283 {
284 ASSERT(isImplThread()); 284 ASSERT(isImplThread());
285 m_layerTreeHost->reduceContentsTexturesMemoryOnImplThread(0, m_layerTreeHost Impl->resourceProvider()); 285 m_layerTreeHost->reduceContentsTexturesMemoryOnImplThread(0, m_layerTreeHost Impl->resourceProvider());
286 } 286 }
287 287
288 // Called by the legacy scheduling path (e.g. where render_widget does the sched uling) 288 // Called by the legacy scheduling path (e.g. where render_widget does the sched uling)
289 void CCSingleThreadProxy::compositeImmediately() 289 void CCSingleThreadProxy::compositeImmediately()
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 376
377 void CCSingleThreadProxy::didSwapFrame() 377 void CCSingleThreadProxy::didSwapFrame()
378 { 378 {
379 if (m_nextFrameIsNewlyCommittedFrame) { 379 if (m_nextFrameIsNewlyCommittedFrame) {
380 m_nextFrameIsNewlyCommittedFrame = false; 380 m_nextFrameIsNewlyCommittedFrame = false;
381 m_layerTreeHost->didCommitAndDrawFrame(); 381 m_layerTreeHost->didCommitAndDrawFrame();
382 } 382 }
383 } 383 }
384 384
385 } 385 }
OLDNEW
« no previous file with comments | « cc/CCSingleThreadProxy.h ('k') | cc/CCTextureUpdateControllerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698