| 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 #ifndef CCThreadProxy_h | 5 #ifndef CCThreadProxy_h |
| 6 #define CCThreadProxy_h | 6 #define CCThreadProxy_h |
| 7 | 7 |
| 8 #include "base/time.h" | 8 #include "base/time.h" |
| 9 #include "cc/animation_events.h" | 9 #include "cc/animation_events.h" |
| 10 #include "cc/completion_event.h" | 10 #include "cc/completion_event.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/resource_update_controller.h" | 13 #include "cc/resource_update_controller.h" |
| 14 #include "cc/scheduler.h" | 14 #include "cc/scheduler.h" |
| 15 | 15 |
| 16 namespace cc { | 16 namespace cc { |
| 17 | 17 |
| 18 class InputHandler; | 18 class InputHandler; |
| 19 class LayerTreeHost; | 19 class LayerTreeHost; |
| 20 class ResourceUpdateQueue; | 20 class ResourceUpdateQueue; |
| 21 class Scheduler; | 21 class Scheduler; |
| 22 class ScopedThreadProxy; | 22 class ScopedThreadProxy; |
| 23 class Thread; | 23 class Thread; |
| 24 | 24 |
| 25 class ThreadProxy : public Proxy, LayerTreeHostImplClient, SchedulerClient, Reso
urceUpdateControllerClient { | 25 class ThreadProxy : public Proxy, LayerTreeHostImplClient, SchedulerClient, Reso
urceUpdateControllerClient { |
| 26 public: | 26 public: |
| 27 static scoped_ptr<Proxy> create(LayerTreeHost*); | 27 static scoped_ptr<Proxy> create(LayerTreeHost*, Thread*); |
| 28 | 28 |
| 29 virtual ~ThreadProxy(); | 29 virtual ~ThreadProxy(); |
| 30 | 30 |
| 31 // Proxy implementation | 31 // Proxy implementation |
| 32 virtual bool compositeAndReadback(void *pixels, const IntRect&) OVERRIDE; | 32 virtual bool compositeAndReadback(void *pixels, const IntRect&) OVERRIDE; |
| 33 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; |
| 34 virtual void finishAllRendering() OVERRIDE; | 34 virtual void finishAllRendering() OVERRIDE; |
| 35 virtual bool isStarted() const OVERRIDE; | 35 virtual bool isStarted() const OVERRIDE; |
| 36 virtual bool initializeContext() OVERRIDE; | 36 virtual bool initializeContext() OVERRIDE; |
| 37 virtual void setSurfaceReady() OVERRIDE; | 37 virtual void setSurfaceReady() OVERRIDE; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 virtual ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapForced()
OVERRIDE; | 70 virtual ScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapForced()
OVERRIDE; |
| 71 virtual void scheduledActionCommit() OVERRIDE; | 71 virtual void scheduledActionCommit() OVERRIDE; |
| 72 virtual void scheduledActionBeginContextRecreation() OVERRIDE; | 72 virtual void scheduledActionBeginContextRecreation() OVERRIDE; |
| 73 virtual void scheduledActionAcquireLayerTexturesForMainThread() OVERRIDE; | 73 virtual void scheduledActionAcquireLayerTexturesForMainThread() OVERRIDE; |
| 74 virtual void didAnticipatedDrawTimeChange(base::TimeTicks) OVERRIDE; | 74 virtual void didAnticipatedDrawTimeChange(base::TimeTicks) OVERRIDE; |
| 75 | 75 |
| 76 // ResourceUpdateControllerClient implementation | 76 // ResourceUpdateControllerClient implementation |
| 77 virtual void readyToFinalizeTextureUpdates() OVERRIDE; | 77 virtual void readyToFinalizeTextureUpdates() OVERRIDE; |
| 78 | 78 |
| 79 private: | 79 private: |
| 80 explicit ThreadProxy(LayerTreeHost*); | 80 ThreadProxy(LayerTreeHost*, Thread* implThread); |
| 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 base::TimeTicks monotonicFrameBeginTime; | 87 base::TimeTicks monotonicFrameBeginTime; |
| 88 scoped_ptr<ScrollAndScaleSet> scrollInfo; | 88 scoped_ptr<ScrollAndScaleSet> scrollInfo; |
| 89 WebKit::WebTransformationMatrix implTransform; | 89 WebKit::WebTransformationMatrix implTransform; |
| 90 PrioritizedTextureManager::BackingList evictedContentsTexturesBackings; | 90 PrioritizedTextureManager::BackingList evictedContentsTexturesBackings; |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 base::TimeDelta m_totalCommitTime; | 174 base::TimeDelta m_totalCommitTime; |
| 175 size_t m_totalCommitCount; | 175 size_t m_totalCommitCount; |
| 176 | 176 |
| 177 bool m_deferCommits; | 177 bool m_deferCommits; |
| 178 bool m_deferredCommitPending; | 178 bool m_deferredCommitPending; |
| 179 }; | 179 }; |
| 180 | 180 |
| 181 } // namespace cc | 181 } // namespace cc |
| 182 | 182 |
| 183 #endif | 183 #endif |
| OLD | NEW |