| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 void SwapDelegatedFrame(uint32_t compositor_frame_sink_id, | 124 void SwapDelegatedFrame(uint32_t compositor_frame_sink_id, |
| 125 cc::CompositorFrame frame); | 125 cc::CompositorFrame frame); |
| 126 void ClearDelegatedFrame(); | 126 void ClearDelegatedFrame(); |
| 127 void WasHidden(); | 127 void WasHidden(); |
| 128 void WasShown(const ui::LatencyInfo& latency_info); | 128 void WasShown(const ui::LatencyInfo& latency_info); |
| 129 void WasResized(); | 129 void WasResized(); |
| 130 bool HasSavedFrame(); | 130 bool HasSavedFrame(); |
| 131 gfx::Size GetRequestedRendererSize() const; | 131 gfx::Size GetRequestedRendererSize() const; |
| 132 void SetCompositor(ui::Compositor* compositor); | 132 void SetCompositor(ui::Compositor* compositor); |
| 133 void ResetCompositor(); | 133 void ResetCompositor(); |
| 134 // Note: |src_subset| is specified in DIP dimensions while |output_size| | 134 // Note: |src_subrect| is specified in DIP dimensions while |output_size| |
| 135 // expects pixels. | 135 // expects pixels. If |src_subrect| is empty, the entire surface area is |
| 136 // copied. |
| 136 void CopyFromCompositingSurface(const gfx::Rect& src_subrect, | 137 void CopyFromCompositingSurface(const gfx::Rect& src_subrect, |
| 137 const gfx::Size& output_size, | 138 const gfx::Size& output_size, |
| 138 const ReadbackRequestCallback& callback, | 139 const ReadbackRequestCallback& callback, |
| 139 const SkColorType preferred_color_type); | 140 const SkColorType preferred_color_type); |
| 140 void CopyFromCompositingSurfaceToVideoFrame( | 141 void CopyFromCompositingSurfaceToVideoFrame( |
| 141 const gfx::Rect& src_subrect, | 142 const gfx::Rect& src_subrect, |
| 142 const scoped_refptr<media::VideoFrame>& target, | 143 const scoped_refptr<media::VideoFrame>& target, |
| 143 const base::Callback<void(const gfx::Rect&, bool)>& callback); | 144 const base::Callback<void(const gfx::Rect&, bool)>& callback); |
| 144 bool CanCopyToVideoFrame() const; | 145 bool CanCopyToVideoFrame() const; |
| 145 void BeginFrameSubscription( | 146 void BeginFrameSubscription( |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 // YUV readback pipeline. | 333 // YUV readback pipeline. |
| 333 std::unique_ptr<display_compositor::ReadbackYUVInterface> | 334 std::unique_ptr<display_compositor::ReadbackYUVInterface> |
| 334 yuv_readback_pipeline_; | 335 yuv_readback_pipeline_; |
| 335 | 336 |
| 336 std::unique_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; | 337 std::unique_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; |
| 337 }; | 338 }; |
| 338 | 339 |
| 339 } // namespace content | 340 } // namespace content |
| 340 | 341 |
| 341 #endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ | 342 #endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ |
| OLD | NEW |