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_COMPOSITOR_DELEGATED_FRAME_HOST_H_ | 5 #ifndef CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ |
6 #define CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ | 6 #define CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ |
7 | 7 |
8 #include "cc/layers/delegated_frame_provider.h" | 8 #include "cc/layers/delegated_frame_provider.h" |
9 #include "cc/layers/delegated_frame_resource_collection.h" | 9 #include "cc/layers/delegated_frame_resource_collection.h" |
10 #include "cc/output/copy_output_result.h" | 10 #include "cc/output/copy_output_result.h" |
11 #include "cc/surfaces/surface_factory_client.h" | 11 #include "cc/surfaces/surface_factory_client.h" |
12 #include "content/browser/compositor/image_transport_factory.h" | 12 #include "content/browser/compositor/image_transport_factory.h" |
13 #include "content/browser/compositor/owned_mailbox.h" | 13 #include "content/browser/compositor/owned_mailbox.h" |
14 #include "content/browser/renderer_host/delegated_frame_evictor.h" | 14 #include "content/browser/renderer_host/delegated_frame_evictor.h" |
15 #include "content/browser/renderer_host/dip_util.h" | 15 #include "content/browser/renderer_host/dip_util.h" |
16 #include "content/browser/renderer_host/render_widget_host_impl.h" | 16 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 17 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
17 #include "content/public/browser/render_process_host.h" | 18 #include "content/public/browser/render_process_host.h" |
18 #include "ui/compositor/compositor.h" | 19 #include "ui/compositor/compositor.h" |
19 #include "ui/compositor/compositor_observer.h" | 20 #include "ui/compositor/compositor_observer.h" |
20 #include "ui/compositor/compositor_vsync_manager.h" | 21 #include "ui/compositor/compositor_vsync_manager.h" |
21 #include "ui/compositor/layer.h" | 22 #include "ui/compositor/layer.h" |
22 #include "ui/compositor/layer_owner_delegate.h" | 23 #include "ui/compositor/layer_owner_delegate.h" |
23 #include "ui/gfx/rect_conversions.h" | 24 #include "ui/gfx/rect_conversions.h" |
24 | 25 |
25 namespace cc { | 26 namespace cc { |
26 class SurfaceFactory; | 27 class SurfaceFactory; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 scoped_ptr<cc::DelegatedFrameData> frame_data, | 91 scoped_ptr<cc::DelegatedFrameData> frame_data, |
91 float frame_device_scale_factor, | 92 float frame_device_scale_factor, |
92 const std::vector<ui::LatencyInfo>& latency_info); | 93 const std::vector<ui::LatencyInfo>& latency_info); |
93 void WasHidden(); | 94 void WasHidden(); |
94 void WasShown(const ui::LatencyInfo& latency_info); | 95 void WasShown(const ui::LatencyInfo& latency_info); |
95 void WasResized(); | 96 void WasResized(); |
96 bool HasSavedFrame(); | 97 bool HasSavedFrame(); |
97 gfx::Size GetRequestedRendererSize() const; | 98 gfx::Size GetRequestedRendererSize() const; |
98 void AddedToWindow(); | 99 void AddedToWindow(); |
99 void RemovingFromWindow(); | 100 void RemovingFromWindow(); |
100 void CopyFromCompositingSurface( | 101 void CopyFromCompositingSurface(const gfx::Rect& src_subrect, |
101 const gfx::Rect& src_subrect, | 102 const gfx::Size& output_size, |
102 const gfx::Size& output_size, | 103 CompletionCallback& callback, |
103 const base::Callback<void(bool, const SkBitmap&)>& callback, | 104 const SkColorType color_type); |
104 const SkColorType color_type); | |
105 void CopyFromCompositingSurfaceToVideoFrame( | 105 void CopyFromCompositingSurfaceToVideoFrame( |
106 const gfx::Rect& src_subrect, | 106 const gfx::Rect& src_subrect, |
107 const scoped_refptr<media::VideoFrame>& target, | 107 const scoped_refptr<media::VideoFrame>& target, |
108 const base::Callback<void(bool)>& callback); | 108 const base::Callback<void(bool)>& callback); |
109 bool CanCopyToVideoFrame() const; | 109 bool CanCopyToVideoFrame() const; |
110 bool CanSubscribeFrame() const; | 110 bool CanSubscribeFrame() const; |
111 void BeginFrameSubscription( | 111 void BeginFrameSubscription( |
112 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber); | 112 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber); |
113 void EndFrameSubscription(); | 113 void EndFrameSubscription(); |
114 bool HasFrameSubscriber() const { return frame_subscriber_; } | 114 bool HasFrameSubscriber() const { return frame_subscriber_; } |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 // YUV readback pipeline. | 306 // YUV readback pipeline. |
307 scoped_ptr<content::ReadbackYUVInterface> | 307 scoped_ptr<content::ReadbackYUVInterface> |
308 yuv_readback_pipeline_; | 308 yuv_readback_pipeline_; |
309 | 309 |
310 scoped_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; | 310 scoped_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; |
311 }; | 311 }; |
312 | 312 |
313 } // namespace content | 313 } // namespace content |
314 | 314 |
315 #endif // CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ | 315 #endif // CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ |
OLD | NEW |