OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_DELEGATE_H_ | 5 #ifndef CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_DELEGATE_H_ |
6 #define CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_DELEGATE_H_ | 6 #define CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_DELEGATE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 class WebWidget; | 14 class WebWidget; |
15 } | 15 } |
16 | 16 |
17 namespace cc { | 17 namespace cc { |
18 class BeginFrameSource; | 18 class BeginFrameSource; |
19 class CopyOutputRequest; | 19 class CopyOutputRequest; |
20 class OutputSurface; | 20 class CompositorFrameSink; |
21 class SwapPromise; | 21 class SwapPromise; |
22 } | 22 } |
23 | 23 |
24 namespace gfx { | 24 namespace gfx { |
25 class Vector2dF; | 25 class Vector2dF; |
26 } | 26 } |
27 | 27 |
28 namespace content { | 28 namespace content { |
29 | 29 |
30 // Consumers of RenderWidgetCompositor implement this delegate in order to | 30 // Consumers of RenderWidgetCompositor implement this delegate in order to |
31 // transport compositing information across processes. | 31 // transport compositing information across processes. |
32 class CONTENT_EXPORT RenderWidgetCompositorDelegate { | 32 class CONTENT_EXPORT RenderWidgetCompositorDelegate { |
33 public: | 33 public: |
34 // Report viewport related properties during a commit from the compositor | 34 // Report viewport related properties during a commit from the compositor |
35 // thread. | 35 // thread. |
36 virtual void ApplyViewportDeltas( | 36 virtual void ApplyViewportDeltas( |
37 const gfx::Vector2dF& inner_delta, | 37 const gfx::Vector2dF& inner_delta, |
38 const gfx::Vector2dF& outer_delta, | 38 const gfx::Vector2dF& outer_delta, |
39 const gfx::Vector2dF& elastic_overscroll_delta, | 39 const gfx::Vector2dF& elastic_overscroll_delta, |
40 float page_scale, | 40 float page_scale, |
41 float top_controls_delta) = 0; | 41 float top_controls_delta) = 0; |
42 | 42 |
43 // Notifies that the compositor has issed a BeginMainFrame. | 43 // Notifies that the compositor has issed a BeginMainFrame. |
44 virtual void BeginMainFrame(double frame_time_sec) = 0; | 44 virtual void BeginMainFrame(double frame_time_sec) = 0; |
45 | 45 |
46 // Requests an OutputSurface to render into. | 46 // Requests a CompositorFrameSink to submit to. |
47 virtual std::unique_ptr<cc::OutputSurface> CreateOutputSurface( | 47 virtual std::unique_ptr<cc::CompositorFrameSink> CreateCompositorFrameSink( |
48 bool fallback) = 0; | 48 bool fallback) = 0; |
49 | 49 |
50 // Notifies that the draw commands for a committed frame have been issued. | 50 // Notifies that the draw commands for a committed frame have been issued. |
51 virtual void DidCommitAndDrawCompositorFrame() = 0; | 51 virtual void DidCommitAndDrawCompositorFrame() = 0; |
52 | 52 |
53 // Notifies about a compositor frame commit operation having finished. | 53 // Notifies about a compositor frame commit operation having finished. |
54 virtual void DidCommitCompositorFrame() = 0; | 54 virtual void DidCommitCompositorFrame() = 0; |
55 | 55 |
56 // Called by the compositor when page scale animation completed. | 56 // Called by the compositor when page scale animation completed. |
57 virtual void DidCompletePageScaleAnimation() = 0; | 57 virtual void DidCompletePageScaleAnimation() = 0; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 virtual std::unique_ptr<cc::SwapPromise> RequestCopyOfOutputForLayoutTest( | 94 virtual std::unique_ptr<cc::SwapPromise> RequestCopyOfOutputForLayoutTest( |
95 std::unique_ptr<cc::CopyOutputRequest> request) = 0; | 95 std::unique_ptr<cc::CopyOutputRequest> request) = 0; |
96 | 96 |
97 protected: | 97 protected: |
98 virtual ~RenderWidgetCompositorDelegate() {} | 98 virtual ~RenderWidgetCompositorDelegate() {} |
99 }; | 99 }; |
100 | 100 |
101 } // namespace content | 101 } // namespace content |
102 | 102 |
103 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_DELEGATE_H_ | 103 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_DELEGATE_H_ |
OLD | NEW |