| 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_COMPOSITOR_FRAME_SINK_CLIENT_H_ | 5 #ifndef CC_OUTPUT_COMPOSITOR_FRAME_SINK_CLIENT_H_ |
| 6 #define CC_OUTPUT_COMPOSITOR_FRAME_SINK_CLIENT_H_ | 6 #define CC_OUTPUT_COMPOSITOR_FRAME_SINK_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" |
| 11 #include "cc/base/cc_export.h" | 11 #include "cc/base/cc_export.h" |
| 12 #include "cc/output/context_provider.h" | 12 #include "cc/output/context_provider.h" |
| 13 #include "cc/resources/returned_resource.h" | 13 #include "cc/resources/returned_resource.h" |
| 14 #include "gpu/command_buffer/common/texture_in_use_response.h" | 14 #include "gpu/command_buffer/common/texture_in_use_response.h" |
| 15 #include "ui/gfx/geometry/rect.h" | 15 #include "ui/gfx/geometry/rect.h" |
| 16 | 16 |
| 17 namespace gfx { | 17 namespace gfx { |
| 18 class Transform; | 18 class Transform; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace cc { | 21 namespace cc { |
| 22 | 22 |
| 23 class BeginFrameSource; | 23 class BeginFrameSource; |
| 24 struct ManagedMemoryPolicy; | 24 struct ManagedMemoryPolicy; |
| 25 | 25 |
| 26 class CC_EXPORT CompositorFrameSinkClient { | 26 class CC_EXPORT CompositorFrameSinkClient { |
| 27 public: | 27 public: |
| 28 // ============== DISPLAY COMPOSITOR ONLY ======================= | |
| 29 | |
| 30 // From surfaceless/ozone browser compositor output surface. | |
| 31 virtual void SetNeedsRedrawRect(const gfx::Rect& damage_rect) = 0; | |
| 32 // For overlays. | |
| 33 virtual void DidReceiveTextureInUseResponses( | |
| 34 const gpu::TextureInUseResponses& responses) = 0; | |
| 35 | |
| 36 // ============== LAYER TREE COMPOSITOR ONLY ==================== | |
| 37 | |
| 38 // Pass the begin frame source for the client to observe. Client does not own | 28 // Pass the begin frame source for the client to observe. Client does not own |
| 39 // the BeginFrameSource. CompositorFrameSink should call this once after | 29 // the BeginFrameSource. CompositorFrameSink should call this once after |
| 40 // binding to | 30 // binding to |
| 41 // the client and then call again with a null while detaching. | 31 // the client and then call again with a null while detaching. |
| 42 virtual void SetBeginFrameSource(BeginFrameSource* source) = 0; | 32 virtual void SetBeginFrameSource(BeginFrameSource* source) = 0; |
| 43 virtual void ReclaimResources(const ReturnedResourceArray& resources) = 0; | 33 virtual void ReclaimResources(const ReturnedResourceArray& resources) = 0; |
| 44 // For WebView. | 34 // For WebView. |
| 45 virtual void SetExternalTilePriorityConstraints( | 35 virtual void SetExternalTilePriorityConstraints( |
| 46 const gfx::Rect& viewport_rect, | 36 const gfx::Rect& viewport_rect, |
| 47 const gfx::Transform& transform) = 0; | 37 const gfx::Transform& transform) = 0; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 72 // lost callback, so we need to support multiple callbacks. | 62 // lost callback, so we need to support multiple callbacks. |
| 73 virtual void DidLoseCompositorFrameSink() = 0; | 63 virtual void DidLoseCompositorFrameSink() = 0; |
| 74 | 64 |
| 75 protected: | 65 protected: |
| 76 virtual ~CompositorFrameSinkClient() {} | 66 virtual ~CompositorFrameSinkClient() {} |
| 77 }; | 67 }; |
| 78 | 68 |
| 79 } // namespace cc | 69 } // namespace cc |
| 80 | 70 |
| 81 #endif // CC_OUTPUT_COMPOSITOR_FRAME_SINK_CLIENT_H_ | 71 #endif // CC_OUTPUT_COMPOSITOR_FRAME_SINK_CLIENT_H_ |
| OLD | NEW |