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" |
(...skipping 11 matching lines...) Expand all Loading... |
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*); |
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 gfx::Rect&) 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; |
38 virtual void setVisible(bool) OVERRIDE; | 38 virtual void setVisible(bool) OVERRIDE; |
39 virtual bool initializeRenderer() OVERRIDE; | 39 virtual bool initializeRenderer() OVERRIDE; |
40 virtual bool recreateContext() OVERRIDE; | 40 virtual bool recreateContext() OVERRIDE; |
41 virtual void renderingStats(RenderingStats*) OVERRIDE; | 41 virtual void renderingStats(RenderingStats*) OVERRIDE; |
42 virtual const RendererCapabilities& rendererCapabilities() const OVERRIDE; | 42 virtual const RendererCapabilities& rendererCapabilities() const OVERRIDE; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 void didCompleteSwapBuffers(); | 98 void didCompleteSwapBuffers(); |
99 void setAnimationEvents(scoped_ptr<AnimationEventsVector>, base::Time wallCl
ockTime); | 99 void setAnimationEvents(scoped_ptr<AnimationEventsVector>, base::Time wallCl
ockTime); |
100 void beginContextRecreation(); | 100 void beginContextRecreation(); |
101 void tryToRecreateContext(); | 101 void tryToRecreateContext(); |
102 | 102 |
103 // Called on impl thread | 103 // Called on impl thread |
104 struct ReadbackRequest { | 104 struct ReadbackRequest { |
105 CompletionEvent completion; | 105 CompletionEvent completion; |
106 bool success; | 106 bool success; |
107 void* pixels; | 107 void* pixels; |
108 IntRect rect; | 108 gfx::Rect rect; |
109 }; | 109 }; |
110 void forceBeginFrameOnImplThread(CompletionEvent*); | 110 void forceBeginFrameOnImplThread(CompletionEvent*); |
111 void beginFrameCompleteOnImplThread(CompletionEvent*, ResourceUpdateQueue*); | 111 void beginFrameCompleteOnImplThread(CompletionEvent*, ResourceUpdateQueue*); |
112 void beginFrameAbortedOnImplThread(); | 112 void beginFrameAbortedOnImplThread(); |
113 void requestReadbackOnImplThread(ReadbackRequest*); | 113 void requestReadbackOnImplThread(ReadbackRequest*); |
114 void requestStartPageScaleAnimationOnImplThread(IntSize targetPosition, bool
useAnchor, float scale, base::TimeDelta duration); | 114 void requestStartPageScaleAnimationOnImplThread(IntSize targetPosition, bool
useAnchor, float scale, base::TimeDelta duration); |
115 void finishAllRenderingOnImplThread(CompletionEvent*); | 115 void finishAllRenderingOnImplThread(CompletionEvent*); |
116 void initializeImplOnImplThread(CompletionEvent*, InputHandler*); | 116 void initializeImplOnImplThread(CompletionEvent*, InputHandler*); |
117 void setSurfaceReadyOnImplThread(); | 117 void setSurfaceReadyOnImplThread(); |
118 void setVisibleOnImplThread(CompletionEvent*, bool); | 118 void setVisibleOnImplThread(CompletionEvent*, bool); |
(...skipping 55 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 |