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 CC_SINGLE_THREAD_PROXY_H_ | 5 #ifndef CC_SINGLE_THREAD_PROXY_H_ |
6 #define CC_SINGLE_THREAD_PROXY_H_ | 6 #define CC_SINGLE_THREAD_PROXY_H_ |
7 | 7 |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/time.h" | 10 #include "base/time.h" |
11 #include "cc/animation_events.h" | 11 #include "cc/animation_events.h" |
12 #include "cc/layer_tree_host_impl.h" | 12 #include "cc/layer_tree_host_impl.h" |
13 #include "cc/proxy.h" | 13 #include "cc/proxy.h" |
14 | 14 |
15 namespace cc { | 15 namespace cc { |
16 | 16 |
17 class LayerTreeHost; | 17 class LayerTreeHost; |
18 | 18 |
19 class SingleThreadProxy : public Proxy, LayerTreeHostImplClient { | 19 class SingleThreadProxy : public Proxy, LayerTreeHostImplClient { |
20 public: | 20 public: |
21 static scoped_ptr<Proxy> create(LayerTreeHost*); | 21 static scoped_ptr<Proxy> create(LayerTreeHost*); |
22 virtual ~SingleThreadProxy(); | 22 virtual ~SingleThreadProxy(); |
23 | 23 |
24 // Proxy implementation | 24 // Proxy implementation |
25 virtual bool compositeAndReadback(void *pixels, const gfx::Rect&) OVERRIDE; | 25 virtual bool compositeAndReadback(void *pixels, const gfx::Rect&) OVERRIDE; |
26 virtual void startPageScaleAnimation(gfx::Vector2d targetOffset, bool useAnc
hor, float scale, base::TimeDelta duration) OVERRIDE; | 26 virtual void startPageScaleAnimation(gfx::Vector2d targetOffset, bool useAnc
hor, float scale, base::TimeDelta duration) OVERRIDE; |
| 27 virtual void programmaticScroll(gfx::Vector2d targetOffset) OVERRIDE; |
27 virtual void finishAllRendering() OVERRIDE; | 28 virtual void finishAllRendering() OVERRIDE; |
28 virtual bool isStarted() const OVERRIDE; | 29 virtual bool isStarted() const OVERRIDE; |
29 virtual bool initializeOutputSurface() OVERRIDE; | 30 virtual bool initializeOutputSurface() OVERRIDE; |
30 virtual void setSurfaceReady() OVERRIDE; | 31 virtual void setSurfaceReady() OVERRIDE; |
31 virtual void setVisible(bool) OVERRIDE; | 32 virtual void setVisible(bool) OVERRIDE; |
32 virtual bool initializeRenderer() OVERRIDE; | 33 virtual bool initializeRenderer() OVERRIDE; |
33 virtual bool recreateOutputSurface() OVERRIDE; | 34 virtual bool recreateOutputSurface() OVERRIDE; |
34 virtual void renderingStats(RenderingStats*) OVERRIDE; | 35 virtual void renderingStats(RenderingStats*) OVERRIDE; |
35 virtual const RendererCapabilities& rendererCapabilities() const OVERRIDE; | 36 virtual const RendererCapabilities& rendererCapabilities() const OVERRIDE; |
36 virtual void setNeedsAnimate() OVERRIDE; | 37 virtual void setNeedsAnimate() OVERRIDE; |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 { | 154 { |
154 } | 155 } |
155 private: | 156 private: |
156 DebugScopedSetImplThread m_implThread; | 157 DebugScopedSetImplThread m_implThread; |
157 DebugScopedSetMainThreadBlocked m_mainThreadBlocked; | 158 DebugScopedSetMainThreadBlocked m_mainThreadBlocked; |
158 }; | 159 }; |
159 | 160 |
160 } // namespace cc | 161 } // namespace cc |
161 | 162 |
162 #endif // CC_SINGLE_THREAD_PROXY_H_ | 163 #endif // CC_SINGLE_THREAD_PROXY_H_ |
OLD | NEW |