OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_OUTPUT_OUTPUT_SURFACE_CLIENT_H_ | 5 #ifndef CC_OUTPUT_OUTPUT_SURFACE_CLIENT_H_ |
6 #define CC_OUTPUT_OUTPUT_SURFACE_CLIENT_H_ | 6 #define CC_OUTPUT_OUTPUT_SURFACE_CLIENT_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 class CC_EXPORT OutputSurfaceClient { | 24 class CC_EXPORT OutputSurfaceClient { |
25 public: | 25 public: |
26 virtual void CommitVSyncParameters(base::TimeTicks timebase, | 26 virtual void CommitVSyncParameters(base::TimeTicks timebase, |
27 base::TimeDelta interval) = 0; | 27 base::TimeDelta interval) = 0; |
28 virtual void SetNeedsRedrawRect(const gfx::Rect& damage_rect) = 0; | 28 virtual void SetNeedsRedrawRect(const gfx::Rect& damage_rect) = 0; |
29 virtual void DidSwapBuffers() = 0; | 29 virtual void DidSwapBuffers() = 0; |
30 virtual void DidSwapBuffersComplete() = 0; | 30 virtual void DidSwapBuffersComplete() = 0; |
31 virtual void ReclaimResources(const CompositorFrameAck* ack) = 0; | 31 virtual void ReclaimResources(const CompositorFrameAck* ack) = 0; |
32 virtual void DidLoseOutputSurface() = 0; | 32 virtual void DidLoseOutputSurface() = 0; |
33 virtual void SetExternalDrawConstraints( | 33 virtual void SetExternalTilePriorityConstraints( |
34 const gfx::Transform& transform, | 34 const gfx::Rect& viewport_rect, |
35 const gfx::Rect& viewport, | 35 const gfx::Transform& transform) = 0; |
36 const gfx::Rect& clip, | |
37 const gfx::Rect& viewport_rect_for_tile_priority, | |
38 const gfx::Transform& transform_for_tile_priority, | |
39 bool resourceless_software_draw) = 0; | |
40 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) = 0; | 36 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) = 0; |
41 // If set, |callback| will be called subsequent to each new tree activation, | 37 // If set, |callback| will be called subsequent to each new tree activation, |
42 // regardless of the compositor visibility or damage. |callback| must remain | 38 // regardless of the compositor visibility or damage. |callback| must remain |
43 // valid for the lifetime of the OutputSurfaceClient or until unregisted -- | 39 // valid for the lifetime of the OutputSurfaceClient or until unregisted -- |
44 // use SetTreeActivationCallback(base::Closure()) to unregister it. | 40 // use SetTreeActivationCallback(base::Closure()) to unregister it. |
45 virtual void SetTreeActivationCallback(const base::Closure& callback) = 0; | 41 virtual void SetTreeActivationCallback(const base::Closure& callback) = 0; |
46 // This allows the output surface to ask it's client for a draw. | 42 // This allows the output surface to ask it's client for a draw. |
47 virtual void OnDraw() = 0; | 43 virtual void OnDraw(const gfx::Transform& transform, |
| 44 const gfx::Rect& viewport, |
| 45 const gfx::Rect& clip, |
| 46 bool resourceless_software_draw) = 0; |
48 | 47 |
49 protected: | 48 protected: |
50 virtual ~OutputSurfaceClient() {} | 49 virtual ~OutputSurfaceClient() {} |
51 }; | 50 }; |
52 | 51 |
53 } // namespace cc | 52 } // namespace cc |
54 | 53 |
55 #endif // CC_OUTPUT_OUTPUT_SURFACE_CLIENT_H_ | 54 #endif // CC_OUTPUT_OUTPUT_SURFACE_CLIENT_H_ |
OLD | NEW |