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 class PictureLayer; |
| 19 class PicturePileImpl; |
18 | 20 |
19 class SingleThreadProxy : public Proxy, LayerTreeHostImplClient { | 21 class SingleThreadProxy : public Proxy, LayerTreeHostImplClient { |
20 public: | 22 public: |
21 static scoped_ptr<Proxy> create(LayerTreeHost*); | 23 static scoped_ptr<Proxy> create(LayerTreeHost*); |
22 virtual ~SingleThreadProxy(); | 24 virtual ~SingleThreadProxy(); |
23 | 25 |
24 // Proxy implementation | 26 // Proxy implementation |
25 virtual bool compositeAndReadback(void *pixels, const gfx::Rect&) OVERRIDE; | 27 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; | 28 virtual void startPageScaleAnimation(gfx::Vector2d targetOffset, bool useAnc
hor, float scale, base::TimeDelta duration) OVERRIDE; |
27 virtual void finishAllRendering() OVERRIDE; | 29 virtual void finishAllRendering() OVERRIDE; |
(...skipping 11 matching lines...) Expand all Loading... |
39 virtual void setNeedsRedraw() OVERRIDE; | 41 virtual void setNeedsRedraw() OVERRIDE; |
40 virtual void setDeferCommits(bool) OVERRIDE; | 42 virtual void setDeferCommits(bool) OVERRIDE; |
41 virtual bool commitRequested() const OVERRIDE; | 43 virtual bool commitRequested() const OVERRIDE; |
42 virtual void mainThreadHasStoppedFlinging() OVERRIDE { } | 44 virtual void mainThreadHasStoppedFlinging() OVERRIDE { } |
43 virtual void start() OVERRIDE; | 45 virtual void start() OVERRIDE; |
44 virtual void stop() OVERRIDE; | 46 virtual void stop() OVERRIDE; |
45 virtual size_t maxPartialTextureUpdates() const OVERRIDE; | 47 virtual size_t maxPartialTextureUpdates() const OVERRIDE; |
46 virtual void acquireLayerTextures() OVERRIDE { } | 48 virtual void acquireLayerTextures() OVERRIDE { } |
47 virtual void forceSerializeOnSwapBuffers() OVERRIDE; | 49 virtual void forceSerializeOnSwapBuffers() OVERRIDE; |
48 virtual bool commitPendingForTesting() OVERRIDE; | 50 virtual bool commitPendingForTesting() OVERRIDE; |
| 51 virtual scoped_refptr<PicturePileImpl> capturePicturePile(const PictureLayer
* layer) OVERRIDE; |
49 | 52 |
50 // LayerTreeHostImplClient implementation | 53 // LayerTreeHostImplClient implementation |
51 virtual void didLoseOutputSurfaceOnImplThread() OVERRIDE { } | 54 virtual void didLoseOutputSurfaceOnImplThread() OVERRIDE { } |
52 virtual void onSwapBuffersCompleteOnImplThread() OVERRIDE; | 55 virtual void onSwapBuffersCompleteOnImplThread() OVERRIDE; |
53 virtual void onVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe
lta interval) OVERRIDE { } | 56 virtual void onVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe
lta interval) OVERRIDE { } |
54 virtual void onCanDrawStateChanged(bool canDraw) OVERRIDE { } | 57 virtual void onCanDrawStateChanged(bool canDraw) OVERRIDE { } |
55 virtual void onHasPendingTreeStateChanged(bool havePendingTree) OVERRIDE; | 58 virtual void onHasPendingTreeStateChanged(bool havePendingTree) OVERRIDE; |
56 virtual void setNeedsRedrawOnImplThread() OVERRIDE; | 59 virtual void setNeedsRedrawOnImplThread() OVERRIDE; |
57 virtual void setNeedsCommitOnImplThread() OVERRIDE; | 60 virtual void setNeedsCommitOnImplThread() OVERRIDE; |
58 virtual void setNeedsManageTilesOnImplThread() OVERRIDE; | 61 virtual void setNeedsManageTilesOnImplThread() OVERRIDE; |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 { | 150 { |
148 } | 151 } |
149 private: | 152 private: |
150 DebugScopedSetImplThread m_implThread; | 153 DebugScopedSetImplThread m_implThread; |
151 DebugScopedSetMainThreadBlocked m_mainThreadBlocked; | 154 DebugScopedSetMainThreadBlocked m_mainThreadBlocked; |
152 }; | 155 }; |
153 | 156 |
154 } // namespace cc | 157 } // namespace cc |
155 | 158 |
156 #endif // CC_SINGLE_THREAD_PROXY_H_ | 159 #endif // CC_SINGLE_THREAD_PROXY_H_ |
OLD | NEW |