| 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 namespace blink { | 8 namespace blink { |
| 9 class WebWidget; | 9 class WebWidget; |
| 10 struct WebScreenInfo; | 10 struct WebScreenInfo; |
| 11 } | 11 } |
| 12 | 12 |
| 13 namespace cc { | 13 namespace cc { |
| 14 class BeginFrameSource; | 14 class BeginFrameSource; |
| 15 class CopyOutputRequest; |
| 15 class OutputSurface; | 16 class OutputSurface; |
| 17 class SwapPromise; |
| 16 } | 18 } |
| 17 | 19 |
| 18 namespace content { | 20 namespace content { |
| 19 | 21 |
| 20 // Consumers of RenderWidgetCompositor implement this delegate in order to | 22 // Consumers of RenderWidgetCompositor implement this delegate in order to |
| 21 // transport compositing information across processes. | 23 // transport compositing information across processes. |
| 22 class CONTENT_EXPORT RenderWidgetCompositorDelegate { | 24 class CONTENT_EXPORT RenderWidgetCompositorDelegate { |
| 23 public: | 25 public: |
| 24 // Report viewport related properties during a commit from the compositor | 26 // Report viewport related properties during a commit from the compositor |
| 25 // thread. | 27 // thread. |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 78 |
| 77 // Requests a visual frame-based update to the state of the delegate if there | 79 // Requests a visual frame-based update to the state of the delegate if there |
| 78 // an update available. | 80 // an update available. |
| 79 virtual void UpdateVisualState() = 0; | 81 virtual void UpdateVisualState() = 0; |
| 80 | 82 |
| 81 // Indicates that the compositor is about to begin a frame. This is primarily | 83 // Indicates that the compositor is about to begin a frame. This is primarily |
| 82 // to signal to flow control mechanisms that a frame is beginning, not to | 84 // to signal to flow control mechanisms that a frame is beginning, not to |
| 83 // perform actual painting work. | 85 // perform actual painting work. |
| 84 virtual void WillBeginCompositorFrame() = 0; | 86 virtual void WillBeginCompositorFrame() = 0; |
| 85 | 87 |
| 88 // For use in layout test mode only, attempts to copy the full content of the |
| 89 // compositor. |
| 90 virtual std::unique_ptr<cc::SwapPromise> RequestCopyOfOutputForLayoutTest( |
| 91 std::unique_ptr<cc::CopyOutputRequest> request) = 0; |
| 92 |
| 86 protected: | 93 protected: |
| 87 virtual ~RenderWidgetCompositorDelegate() {} | 94 virtual ~RenderWidgetCompositorDelegate() {} |
| 88 }; | 95 }; |
| 89 | 96 |
| 90 } // namespace content | 97 } // namespace content |
| 91 | 98 |
| 92 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_DELEGATE_H_ | 99 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_DELEGATE_H_ |
| OLD | NEW |