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

Side by Side Diff: cc/thread_proxy.h

Issue 11232051: Remove static thread pointers from CC (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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
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 #ifndef CCThreadProxy_h 5 #ifndef CCThreadProxy_h
6 #define CCThreadProxy_h 6 #define CCThreadProxy_h
7 7
8 #include "CCAnimationEvents.h" 8 #include "CCAnimationEvents.h"
9 #include "CCCompletionEvent.h" 9 #include "CCCompletionEvent.h"
10 #include "base/time.h" 10 #include "base/time.h"
11 #include "cc/layer_tree_host_impl.h" 11 #include "cc/layer_tree_host_impl.h"
12 #include "cc/proxy.h" 12 #include "cc/proxy.h"
13 #include "cc/scheduler.h" 13 #include "cc/scheduler.h"
14 #include "cc/texture_update_controller.h" 14 #include "cc/texture_update_controller.h"
15 15
16 namespace cc { 16 namespace cc {
17 17
18 class CCInputHandler; 18 class CCInputHandler;
19 class CCLayerTreeHost; 19 class CCLayerTreeHost;
20 class CCScheduler; 20 class CCScheduler;
21 class CCScopedThreadProxy; 21 class CCScopedThreadProxy;
22 class CCTextureUpdateQueue; 22 class CCTextureUpdateQueue;
23 class CCThread; 23 class CCThread;
24 class CCThreadProxyContextRecreationTimer; 24 class CCThreadProxyContextRecreationTimer;
25 25
26 class CCThreadProxy : public CCProxy, CCLayerTreeHostImplClient, CCSchedulerClie nt, CCTextureUpdateControllerClient { 26 class CCThreadProxy : public CCProxy, CCLayerTreeHostImplClient, CCSchedulerClie nt, CCTextureUpdateControllerClient {
27 public: 27 public:
28 static scoped_ptr<CCProxy> create(CCLayerTreeHost*); 28 static scoped_ptr<CCProxy> create(CCLayerTreeHost*, CompositorSupportState*) ;
29 29
30 virtual ~CCThreadProxy(); 30 virtual ~CCThreadProxy();
31 31
32 // CCProxy implementation 32 // CCProxy implementation
33 virtual bool compositeAndReadback(void *pixels, const IntRect&) OVERRIDE; 33 virtual bool compositeAndReadback(void *pixels, const IntRect&) OVERRIDE;
34 virtual void startPageScaleAnimation(const IntSize& targetPosition, bool use Anchor, float scale, double duration) OVERRIDE; 34 virtual void startPageScaleAnimation(const IntSize& targetPosition, bool use Anchor, float scale, double duration) OVERRIDE;
35 virtual void finishAllRendering() OVERRIDE; 35 virtual void finishAllRendering() OVERRIDE;
36 virtual bool isStarted() const OVERRIDE; 36 virtual bool isStarted() const OVERRIDE;
37 virtual bool initializeContext() OVERRIDE; 37 virtual bool initializeContext() OVERRIDE;
38 virtual void setSurfaceReady() OVERRIDE; 38 virtual void setSurfaceReady() OVERRIDE;
(...skipping 30 matching lines...) Expand all
69 virtual CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapForced( ) OVERRIDE; 69 virtual CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapForced( ) OVERRIDE;
70 virtual void scheduledActionCommit() OVERRIDE; 70 virtual void scheduledActionCommit() OVERRIDE;
71 virtual void scheduledActionBeginContextRecreation() OVERRIDE; 71 virtual void scheduledActionBeginContextRecreation() OVERRIDE;
72 virtual void scheduledActionAcquireLayerTexturesForMainThread() OVERRIDE; 72 virtual void scheduledActionAcquireLayerTexturesForMainThread() OVERRIDE;
73 virtual void didAnticipatedDrawTimeChange(base::TimeTicks) OVERRIDE; 73 virtual void didAnticipatedDrawTimeChange(base::TimeTicks) OVERRIDE;
74 74
75 // CCTextureUpdateControllerClient implementation 75 // CCTextureUpdateControllerClient implementation
76 virtual void readyToFinalizeTextureUpdates() OVERRIDE; 76 virtual void readyToFinalizeTextureUpdates() OVERRIDE;
77 77
78 private: 78 private:
79 explicit CCThreadProxy(CCLayerTreeHost*); 79 CCThreadProxy(CCLayerTreeHost*, CompositorSupportState* compositorSupportSta te);
80 friend class CCThreadProxyContextRecreationTimer; 80 friend class CCThreadProxyContextRecreationTimer;
81 81
82 // Set on impl thread, read on main thread. 82 // Set on impl thread, read on main thread.
83 struct BeginFrameAndCommitState { 83 struct BeginFrameAndCommitState {
84 BeginFrameAndCommitState(); 84 BeginFrameAndCommitState();
85 ~BeginFrameAndCommitState(); 85 ~BeginFrameAndCommitState();
86 86
87 double monotonicFrameBeginTime; 87 double monotonicFrameBeginTime;
88 scoped_ptr<CCScrollAndScaleSet> scrollInfo; 88 scoped_ptr<CCScrollAndScaleSet> scrollInfo;
89 WebKit::WebTransformationMatrix implTransform; 89 WebKit::WebTransformationMatrix implTransform;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 171
172 bool m_renderVSyncEnabled; 172 bool m_renderVSyncEnabled;
173 173
174 base::TimeDelta m_totalCommitTime; 174 base::TimeDelta m_totalCommitTime;
175 size_t m_totalCommitCount; 175 size_t m_totalCommitCount;
176 }; 176 };
177 177
178 } 178 }
179 179
180 #endif 180 #endif
OLDNEW
« cc/proxy.h ('K') | « cc/texture_update_controller.cc ('k') | cc/thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698