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

Side by Side Diff: cc/thread_proxy.h

Issue 11369071: A speculative Revert for r165872 - Remove static thread pointers from CC, attempt 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
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 | Annotate | Revision Log
« no previous file with comments | « cc/texture_layer_unittest.cc ('k') | cc/thread_proxy.cc » ('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 #ifndef CC_THREAD_PROXY_H_ 5 #ifndef CC_THREAD_PROXY_H_
6 #define CC_THREAD_PROXY_H_ 6 #define CC_THREAD_PROXY_H_
7 7
8 #include "base/memory/scoped_ptr.h"
9 #include "base/time.h" 8 #include "base/time.h"
10 #include "cc/animation_events.h" 9 #include "cc/animation_events.h"
11 #include "cc/completion_event.h" 10 #include "cc/completion_event.h"
12 #include "cc/layer_tree_host_impl.h" 11 #include "cc/layer_tree_host_impl.h"
13 #include "cc/proxy.h" 12 #include "cc/proxy.h"
14 #include "cc/resource_update_controller.h" 13 #include "cc/resource_update_controller.h"
15 #include "cc/scheduler.h" 14 #include "cc/scheduler.h"
16 15
17 namespace cc { 16 namespace cc {
18 17
19 class InputHandler; 18 class InputHandler;
20 class LayerTreeHost; 19 class LayerTreeHost;
21 class ResourceUpdateQueue; 20 class ResourceUpdateQueue;
22 class Scheduler; 21 class Scheduler;
23 class ScopedThreadProxy; 22 class ScopedThreadProxy;
24 class Thread; 23 class Thread;
25 24
26 class ThreadProxy : public Proxy, LayerTreeHostImplClient, SchedulerClient, Reso urceUpdateControllerClient { 25 class ThreadProxy : public Proxy, LayerTreeHostImplClient, SchedulerClient, Reso urceUpdateControllerClient {
27 public: 26 public:
28 static scoped_ptr<Proxy> create(LayerTreeHost*, scoped_ptr<Thread> implThrea d); 27 static scoped_ptr<Proxy> create(LayerTreeHost*);
29 28
30 virtual ~ThreadProxy(); 29 virtual ~ThreadProxy();
31 30
32 // Proxy implementation 31 // Proxy implementation
33 virtual bool compositeAndReadback(void *pixels, const gfx::Rect&) OVERRIDE; 32 virtual bool compositeAndReadback(void *pixels, const gfx::Rect&) OVERRIDE;
34 virtual void startPageScaleAnimation(const IntSize& targetPosition, bool use Anchor, float scale, base::TimeDelta duration) OVERRIDE; 33 virtual void startPageScaleAnimation(const IntSize& targetPosition, bool use Anchor, float scale, base::TimeDelta duration) OVERRIDE;
35 virtual void finishAllRendering() OVERRIDE; 34 virtual void finishAllRendering() OVERRIDE;
36 virtual bool isStarted() const OVERRIDE; 35 virtual bool isStarted() const OVERRIDE;
37 virtual bool initializeContext() OVERRIDE; 36 virtual bool initializeContext() OVERRIDE;
38 virtual void setSurfaceReady() OVERRIDE; 37 virtual void setSurfaceReady() OVERRIDE;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 virtual ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapForced() OVERRIDE; 70 virtual ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapForced() OVERRIDE;
72 virtual void scheduledActionCommit() OVERRIDE; 71 virtual void scheduledActionCommit() OVERRIDE;
73 virtual void scheduledActionBeginContextRecreation() OVERRIDE; 72 virtual void scheduledActionBeginContextRecreation() OVERRIDE;
74 virtual void scheduledActionAcquireLayerTexturesForMainThread() OVERRIDE; 73 virtual void scheduledActionAcquireLayerTexturesForMainThread() OVERRIDE;
75 virtual void didAnticipatedDrawTimeChange(base::TimeTicks) OVERRIDE; 74 virtual void didAnticipatedDrawTimeChange(base::TimeTicks) OVERRIDE;
76 75
77 // ResourceUpdateControllerClient implementation 76 // ResourceUpdateControllerClient implementation
78 virtual void readyToFinalizeTextureUpdates() OVERRIDE; 77 virtual void readyToFinalizeTextureUpdates() OVERRIDE;
79 78
80 private: 79 private:
81 ThreadProxy(LayerTreeHost*, scoped_ptr<Thread> implThread); 80 explicit ThreadProxy(LayerTreeHost*);
82 81
83 // Set on impl thread, read on main thread. 82 // Set on impl thread, read on main thread.
84 struct BeginFrameAndCommitState { 83 struct BeginFrameAndCommitState {
85 BeginFrameAndCommitState(); 84 BeginFrameAndCommitState();
86 ~BeginFrameAndCommitState(); 85 ~BeginFrameAndCommitState();
87 86
88 base::TimeTicks monotonicFrameBeginTime; 87 base::TimeTicks monotonicFrameBeginTime;
89 scoped_ptr<ScrollAndScaleSet> scrollInfo; 88 scoped_ptr<ScrollAndScaleSet> scrollInfo;
90 WebKit::WebTransformationMatrix implTransform; 89 WebKit::WebTransformationMatrix implTransform;
91 PrioritizedTextureManager::BackingList evictedContentsTexturesBackings; 90 PrioritizedTextureManager::BackingList evictedContentsTexturesBackings;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 base::TimeDelta m_totalCommitTime; 174 base::TimeDelta m_totalCommitTime;
176 size_t m_totalCommitCount; 175 size_t m_totalCommitCount;
177 176
178 bool m_deferCommits; 177 bool m_deferCommits;
179 bool m_deferredCommitPending; 178 bool m_deferredCommitPending;
180 }; 179 };
181 180
182 } // namespace cc 181 } // namespace cc
183 182
184 #endif // CC_THREAD_PROXY_H_ 183 #endif // CC_THREAD_PROXY_H_
OLDNEW
« no previous file with comments | « cc/texture_layer_unittest.cc ('k') | cc/thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698