| 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 "cc/debug/frame_timing_tracker.h" | 8 #include "cc/debug/frame_timing_tracker.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 class WebWidget; | 11 class WebWidget; |
| 12 struct WebScreenInfo; | 12 struct WebScreenInfo; |
| 13 } | 13 } |
| 14 | 14 |
| 15 namespace cc { | 15 namespace cc { |
| 16 class BeginFrameSource; | 16 class BeginFrameSource; |
| 17 class OutputSurface; | 17 class OutputSurface; |
| 18 struct LayerTreeMutations; |
| 18 } | 19 } |
| 19 | 20 |
| 20 namespace content { | 21 namespace content { |
| 21 | 22 |
| 22 // Consumers of RenderWidgetCompositor implement this delegate in order to | 23 // Consumers of RenderWidgetCompositor implement this delegate in order to |
| 23 // transport compositing information across processes. | 24 // transport compositing information across processes. |
| 24 class CONTENT_EXPORT RenderWidgetCompositorDelegate { | 25 class CONTENT_EXPORT RenderWidgetCompositorDelegate { |
| 25 public: | 26 public: |
| 26 // Report viewport related properties during a commit from the compositor | 27 // Report viewport related properties during a commit from the compositor |
| 27 // thread. | 28 // thread. |
| 28 virtual void ApplyViewportDeltas( | 29 virtual void ApplyViewportDeltas( |
| 29 const gfx::Vector2dF& inner_delta, | 30 const gfx::Vector2dF& inner_delta, |
| 30 const gfx::Vector2dF& outer_delta, | 31 const gfx::Vector2dF& outer_delta, |
| 31 const gfx::Vector2dF& elastic_overscroll_delta, | 32 const gfx::Vector2dF& elastic_overscroll_delta, |
| 32 float page_scale, | 33 float page_scale, |
| 33 float top_controls_delta) = 0; | 34 float top_controls_delta) = 0; |
| 34 | 35 |
| 36 // Report layer tree mutations from compositor workers during a commit. |
| 37 virtual void ApplyMutations(const cc::LayerTreeMutations& mutations) = 0; |
| 38 |
| 35 // Notifies that the compositor has issed a BeginMainFrame. | 39 // Notifies that the compositor has issed a BeginMainFrame. |
| 36 virtual void BeginMainFrame(double frame_time_sec) = 0; | 40 virtual void BeginMainFrame(double frame_time_sec) = 0; |
| 37 | 41 |
| 38 // Requests an OutputSurface to render into. | 42 // Requests an OutputSurface to render into. |
| 39 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback) = 0; | 43 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback) = 0; |
| 40 | 44 |
| 41 // Requests an external BeginFrameSource from the delegate. | 45 // Requests an external BeginFrameSource from the delegate. |
| 42 virtual scoped_ptr<cc::BeginFrameSource> CreateExternalBeginFrameSource() = 0; | 46 virtual scoped_ptr<cc::BeginFrameSource> CreateExternalBeginFrameSource() = 0; |
| 43 | 47 |
| 44 // Notifies that the draw commands for a committed frame have been issued. | 48 // Notifies that the draw commands for a committed frame have been issued. |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // perform actual painting work. | 98 // perform actual painting work. |
| 95 virtual void WillBeginCompositorFrame() = 0; | 99 virtual void WillBeginCompositorFrame() = 0; |
| 96 | 100 |
| 97 protected: | 101 protected: |
| 98 virtual ~RenderWidgetCompositorDelegate() {} | 102 virtual ~RenderWidgetCompositorDelegate() {} |
| 99 }; | 103 }; |
| 100 | 104 |
| 101 } // namespace content | 105 } // namespace content |
| 102 | 106 |
| 103 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_DELEGATE_H_ | 107 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_DELEGATE_H_ |
| OLD | NEW |