Chromium Code Reviews| 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 <vector> | |
| 9 | |
| 8 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| 9 #include "cc/layers/delegated_frame_provider.h" | 11 #include "cc/layers/delegated_frame_provider.h" |
| 10 #include "cc/layers/delegated_frame_resource_collection.h" | 12 #include "cc/layers/delegated_frame_resource_collection.h" |
| 11 #include "cc/output/copy_output_result.h" | 13 #include "cc/output/copy_output_result.h" |
| 12 #include "cc/surfaces/surface_factory_client.h" | 14 #include "cc/surfaces/surface_factory_client.h" |
| 13 #include "content/browser/compositor/image_transport_factory.h" | 15 #include "content/browser/compositor/image_transport_factory.h" |
| 14 #include "content/browser/compositor/owned_mailbox.h" | 16 #include "content/browser/compositor/owned_mailbox.h" |
| 15 #include "content/browser/renderer_host/delegated_frame_evictor.h" | 17 #include "content/browser/renderer_host/delegated_frame_evictor.h" |
| 16 #include "content/browser/renderer_host/dip_util.h" | 18 #include "content/browser/renderer_host/dip_util.h" |
| 17 #include "content/browser/renderer_host/render_widget_host_impl.h" | 19 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 18 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 20 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 19 #include "content/public/browser/render_process_host.h" | 21 #include "content/public/browser/render_process_host.h" |
| 20 #include "ui/compositor/compositor.h" | 22 #include "ui/compositor/compositor.h" |
| 21 #include "ui/compositor/compositor_observer.h" | 23 #include "ui/compositor/compositor_observer.h" |
| 22 #include "ui/compositor/compositor_vsync_manager.h" | 24 #include "ui/compositor/compositor_vsync_manager.h" |
| 23 #include "ui/compositor/layer.h" | 25 #include "ui/compositor/layer.h" |
| 24 #include "ui/compositor/layer_owner_delegate.h" | 26 #include "ui/compositor/layer_owner_delegate.h" |
| 27 #include "ui/events/event.h" | |
|
sadrul
2015/10/29 16:26:36
Looks like vector or this aren't necessary?
| |
| 25 #include "ui/gfx/geometry/rect_conversions.h" | 28 #include "ui/gfx/geometry/rect_conversions.h" |
| 26 | 29 |
| 27 namespace base { | 30 namespace base { |
| 28 class TickClock; | 31 class TickClock; |
| 29 } | 32 } |
| 30 | 33 |
| 31 namespace cc { | 34 namespace cc { |
| 32 class SurfaceFactory; | 35 class SurfaceFactory; |
| 33 enum class SurfaceDrawStatus; | 36 enum class SurfaceDrawStatus; |
| 34 } | 37 } |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 141 const base::TimeDelta& interval); | 144 const base::TimeDelta& interval); |
| 142 // Note: |src_subset| is specified in DIP dimensions while |output_size| | 145 // Note: |src_subset| is specified in DIP dimensions while |output_size| |
| 143 // expects pixels. | 146 // expects pixels. |
| 144 void CopyFromCompositingSurface(const gfx::Rect& src_subrect, | 147 void CopyFromCompositingSurface(const gfx::Rect& src_subrect, |
| 145 const gfx::Size& output_size, | 148 const gfx::Size& output_size, |
| 146 const ReadbackRequestCallback& callback, | 149 const ReadbackRequestCallback& callback, |
| 147 const SkColorType preferred_color_type); | 150 const SkColorType preferred_color_type); |
| 148 void CopyFromCompositingSurfaceToVideoFrame( | 151 void CopyFromCompositingSurfaceToVideoFrame( |
| 149 const gfx::Rect& src_subrect, | 152 const gfx::Rect& src_subrect, |
| 150 const scoped_refptr<media::VideoFrame>& target, | 153 const scoped_refptr<media::VideoFrame>& target, |
| 151 const base::Callback<void(bool)>& callback); | 154 const base::Callback<void(const gfx::Rect&, bool)>& callback); |
| 152 bool CanCopyToVideoFrame() const; | 155 bool CanCopyToVideoFrame() const; |
| 153 void BeginFrameSubscription( | 156 void BeginFrameSubscription( |
| 154 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber); | 157 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber); |
| 155 void EndFrameSubscription(); | 158 void EndFrameSubscription(); |
| 156 bool HasFrameSubscriber() const { return frame_subscriber_; } | 159 bool HasFrameSubscriber() const { return frame_subscriber_; } |
| 157 uint32_t GetSurfaceIdNamespace(); | 160 uint32_t GetSurfaceIdNamespace(); |
| 158 // Returns a null SurfaceId if this DelegatedFrameHost has not yet created | 161 // Returns a null SurfaceId if this DelegatedFrameHost has not yet created |
| 159 // a compositor Surface. | 162 // a compositor Surface. |
| 160 cc::SurfaceId SurfaceIdAtPoint(const gfx::Point& point, | 163 cc::SurfaceId SurfaceIdAtPoint(const gfx::Point& point, |
| 161 gfx::Point* transformed_point); | 164 gfx::Point* transformed_point); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 221 scoped_ptr<cc::CopyOutputResult> result); | 224 scoped_ptr<cc::CopyOutputResult> result); |
| 222 static void PrepareBitmapCopyOutputResult( | 225 static void PrepareBitmapCopyOutputResult( |
| 223 const gfx::Size& dst_size_in_pixel, | 226 const gfx::Size& dst_size_in_pixel, |
| 224 const SkColorType color_type, | 227 const SkColorType color_type, |
| 225 const ReadbackRequestCallback& callback, | 228 const ReadbackRequestCallback& callback, |
| 226 scoped_ptr<cc::CopyOutputResult> result); | 229 scoped_ptr<cc::CopyOutputResult> result); |
| 227 static void CopyFromCompositingSurfaceHasResultForVideo( | 230 static void CopyFromCompositingSurfaceHasResultForVideo( |
| 228 base::WeakPtr<DelegatedFrameHost> rwhva, | 231 base::WeakPtr<DelegatedFrameHost> rwhva, |
| 229 scoped_refptr<OwnedMailbox> subscriber_texture, | 232 scoped_refptr<OwnedMailbox> subscriber_texture, |
| 230 scoped_refptr<media::VideoFrame> video_frame, | 233 scoped_refptr<media::VideoFrame> video_frame, |
| 231 const base::Callback<void(bool)>& callback, | 234 const base::Callback<void(const gfx::Rect&, bool)>& callback, |
| 232 scoped_ptr<cc::CopyOutputResult> result); | 235 scoped_ptr<cc::CopyOutputResult> result); |
| 233 static void CopyFromCompositingSurfaceFinishedForVideo( | 236 static void CopyFromCompositingSurfaceFinishedForVideo( |
| 234 base::WeakPtr<DelegatedFrameHost> rwhva, | 237 base::WeakPtr<DelegatedFrameHost> rwhva, |
| 235 const base::Callback<void(bool)>& callback, | 238 const base::Callback<void(bool)>& callback, |
| 236 scoped_refptr<OwnedMailbox> subscriber_texture, | 239 scoped_refptr<OwnedMailbox> subscriber_texture, |
| 237 scoped_ptr<cc::SingleReleaseCallback> release_callback, | 240 scoped_ptr<cc::SingleReleaseCallback> release_callback, |
| 238 bool result); | 241 bool result); |
| 239 static void ReturnSubscriberTexture( | 242 static void ReturnSubscriberTexture( |
| 240 base::WeakPtr<DelegatedFrameHost> rwhva, | 243 base::WeakPtr<DelegatedFrameHost> rwhva, |
| 241 scoped_refptr<OwnedMailbox> subscriber_texture, | 244 scoped_refptr<OwnedMailbox> subscriber_texture, |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 338 // YUV readback pipeline. | 341 // YUV readback pipeline. |
| 339 scoped_ptr<content::ReadbackYUVInterface> | 342 scoped_ptr<content::ReadbackYUVInterface> |
| 340 yuv_readback_pipeline_; | 343 yuv_readback_pipeline_; |
| 341 | 344 |
| 342 scoped_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; | 345 scoped_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; |
| 343 }; | 346 }; |
| 344 | 347 |
| 345 } // namespace content | 348 } // namespace content |
| 346 | 349 |
| 347 #endif // CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ | 350 #endif // CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ |
| OLD | NEW |