| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 const gfx::Transform& transform) = 0; | 49 const gfx::Transform& transform) = 0; |
| 50 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) = 0; | 50 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) = 0; |
| 51 // If set, |callback| will be called subsequent to each new tree activation, | 51 // If set, |callback| will be called subsequent to each new tree activation, |
| 52 // regardless of the compositor visibility or damage. |callback| must remain | 52 // regardless of the compositor visibility or damage. |callback| must remain |
| 53 // valid for the lifetime of the OutputSurfaceClient or until unregisted -- | 53 // valid for the lifetime of the OutputSurfaceClient or until unregisted -- |
| 54 // use SetTreeActivationCallback(base::Closure()) to unregister it. | 54 // use SetTreeActivationCallback(base::Closure()) to unregister it. |
| 55 virtual void SetTreeActivationCallback(const base::Closure& callback) = 0; | 55 virtual void SetTreeActivationCallback(const base::Closure& callback) = 0; |
| 56 // This allows the output surface to ask its client for a draw. | 56 // This allows the output surface to ask its client for a draw. |
| 57 virtual void OnDraw(const gfx::Transform& transform, | 57 virtual void OnDraw(const gfx::Transform& transform, |
| 58 const gfx::Rect& viewport, | 58 const gfx::Rect& viewport, |
| 59 const gfx::Rect& clip, | |
| 60 bool resourceless_software_draw) = 0; | 59 bool resourceless_software_draw) = 0; |
| 61 | 60 |
| 62 protected: | 61 protected: |
| 63 virtual ~OutputSurfaceClient() {} | 62 virtual ~OutputSurfaceClient() {} |
| 64 }; | 63 }; |
| 65 | 64 |
| 66 } // namespace cc | 65 } // namespace cc |
| 67 | 66 |
| 68 #endif // CC_OUTPUT_OUTPUT_SURFACE_CLIENT_H_ | 67 #endif // CC_OUTPUT_OUTPUT_SURFACE_CLIENT_H_ |
| OLD | NEW |