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 18 matching lines...) Expand all Loading... |
29 // committed. | 29 // committed. |
30 virtual bool DeferredInitialize( | 30 virtual bool DeferredInitialize( |
31 scoped_refptr<ContextProvider> offscreen_context_provider) = 0; | 31 scoped_refptr<ContextProvider> offscreen_context_provider) = 0; |
32 virtual void ReleaseGL() = 0; | 32 virtual void ReleaseGL() = 0; |
33 virtual void SetNeedsRedrawRect(gfx::Rect damage_rect) = 0; | 33 virtual void SetNeedsRedrawRect(gfx::Rect damage_rect) = 0; |
34 virtual void BeginFrame(const BeginFrameArgs& args) = 0; | 34 virtual void BeginFrame(const BeginFrameArgs& args) = 0; |
35 virtual void OnSwapBuffersComplete(const CompositorFrameAck* ack) = 0; | 35 virtual void OnSwapBuffersComplete(const CompositorFrameAck* ack) = 0; |
36 virtual void DidLoseOutputSurface() = 0; | 36 virtual void DidLoseOutputSurface() = 0; |
37 virtual void SetExternalStencilTest(bool enabled) = 0; | 37 virtual void SetExternalStencilTest(bool enabled) = 0; |
38 virtual void SetExternalDrawConstraints(const gfx::Transform& transform, | 38 virtual void SetExternalDrawConstraints(const gfx::Transform& transform, |
39 gfx::Rect viewport) = 0; | 39 gfx::Rect viewport, |
| 40 gfx::Rect clip, |
| 41 bool valid_for_tile_management) = 0; |
40 virtual void SetDiscardBackBufferWhenNotVisible(bool discard) = 0; | 42 virtual void SetDiscardBackBufferWhenNotVisible(bool discard) = 0; |
41 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) = 0; | 43 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) = 0; |
42 // If set, |callback| will be called subsequent to each new tree activation, | 44 // If set, |callback| will be called subsequent to each new tree activation, |
43 // regardless of the compositor visibility or damage. |callback| must remain | 45 // regardless of the compositor visibility or damage. |callback| must remain |
44 // valid for the lifetime of the OutputSurfaceClient or until unregisted -- | 46 // valid for the lifetime of the OutputSurfaceClient or until unregisted -- |
45 // use SetTreeActivationCallback(base::Closure()) to unregister it. | 47 // use SetTreeActivationCallback(base::Closure()) to unregister it. |
46 virtual void SetTreeActivationCallback(const base::Closure& callback) = 0; | 48 virtual void SetTreeActivationCallback(const base::Closure& callback) = 0; |
47 | 49 |
48 protected: | 50 protected: |
49 virtual ~OutputSurfaceClient() {} | 51 virtual ~OutputSurfaceClient() {} |
50 }; | 52 }; |
51 | 53 |
52 } // namespace cc | 54 } // namespace cc |
53 | 55 |
54 #endif // CC_OUTPUT_OUTPUT_SURFACE_CLIENT_H_ | 56 #endif // CC_OUTPUT_OUTPUT_SURFACE_CLIENT_H_ |
OLD | NEW |