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" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 const std::vector<ui::LatencyInfo>& latency_info); | 93 const std::vector<ui::LatencyInfo>& latency_info); |
94 void WasHidden(); | 94 void WasHidden(); |
95 void WasShown(const ui::LatencyInfo& latency_info); | 95 void WasShown(const ui::LatencyInfo& latency_info); |
96 void WasResized(); | 96 void WasResized(); |
97 bool HasSavedFrame(); | 97 bool HasSavedFrame(); |
98 gfx::Size GetRequestedRendererSize() const; | 98 gfx::Size GetRequestedRendererSize() const; |
99 void AddedToWindow(); | 99 void AddedToWindow(); |
100 void RemovingFromWindow(); | 100 void RemovingFromWindow(); |
101 void CopyFromCompositingSurface(const gfx::Rect& src_subrect, | 101 void CopyFromCompositingSurface(const gfx::Rect& src_subrect, |
102 const gfx::Size& output_size, | 102 const gfx::Size& output_size, |
103 CopyFromCompositingSurfaceCallback& callback, | 103 ReadbackRequestCallback& 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(); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 void RunOnCommitCallbacks(); | 175 void RunOnCommitCallbacks(); |
176 | 176 |
177 // Add on compositing commit callback. | 177 // Add on compositing commit callback. |
178 void AddOnCommitCallbackAndDisableLocks(const base::Closure& callback); | 178 void AddOnCommitCallbackAndDisableLocks(const base::Closure& callback); |
179 | 179 |
180 // Called after async thumbnailer task completes. Scales and crops the result | 180 // Called after async thumbnailer task completes. Scales and crops the result |
181 // of the copy. | 181 // of the copy. |
182 static void CopyFromCompositingSurfaceHasResult( | 182 static void CopyFromCompositingSurfaceHasResult( |
183 const gfx::Size& dst_size_in_pixel, | 183 const gfx::Size& dst_size_in_pixel, |
184 const SkColorType color_type, | 184 const SkColorType color_type, |
185 const base::Callback<void(bool, const SkBitmap&)>& callback, | 185 ReadbackRequestCallback& callback, |
186 scoped_ptr<cc::CopyOutputResult> result); | 186 scoped_ptr<cc::CopyOutputResult> result); |
187 static void PrepareTextureCopyOutputResult( | 187 static void PrepareTextureCopyOutputResult( |
188 const gfx::Size& dst_size_in_pixel, | 188 const gfx::Size& dst_size_in_pixel, |
189 const SkColorType color_type, | 189 const SkColorType color_type, |
190 const base::Callback<void(bool, const SkBitmap&)>& callback, | 190 ReadbackRequestCallback& callback, |
191 scoped_ptr<cc::CopyOutputResult> result); | 191 scoped_ptr<cc::CopyOutputResult> result); |
192 static void PrepareBitmapCopyOutputResult( | 192 static void PrepareBitmapCopyOutputResult( |
193 const gfx::Size& dst_size_in_pixel, | 193 const gfx::Size& dst_size_in_pixel, |
194 const SkColorType color_type, | 194 const SkColorType color_type, |
195 const base::Callback<void(bool, const SkBitmap&)>& callback, | 195 ReadbackRequestCallback& callback, |
196 scoped_ptr<cc::CopyOutputResult> result); | 196 scoped_ptr<cc::CopyOutputResult> result); |
197 static void CopyFromCompositingSurfaceHasResultForVideo( | 197 static void CopyFromCompositingSurfaceHasResultForVideo( |
198 base::WeakPtr<DelegatedFrameHost> rwhva, | 198 base::WeakPtr<DelegatedFrameHost> rwhva, |
199 scoped_refptr<OwnedMailbox> subscriber_texture, | 199 scoped_refptr<OwnedMailbox> subscriber_texture, |
200 scoped_refptr<media::VideoFrame> video_frame, | 200 scoped_refptr<media::VideoFrame> video_frame, |
201 const base::Callback<void(bool)>& callback, | 201 const base::Callback<void(bool)>& callback, |
202 scoped_ptr<cc::CopyOutputResult> result); | 202 scoped_ptr<cc::CopyOutputResult> result); |
203 static void CopyFromCompositingSurfaceFinishedForVideo( | 203 static void CopyFromCompositingSurfaceFinishedForVideo( |
204 base::WeakPtr<DelegatedFrameHost> rwhva, | 204 base::WeakPtr<DelegatedFrameHost> rwhva, |
205 const base::Callback<void(bool)>& callback, | 205 const base::Callback<void(bool)>& callback, |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 // YUV readback pipeline. | 304 // YUV readback pipeline. |
305 scoped_ptr<content::ReadbackYUVInterface> | 305 scoped_ptr<content::ReadbackYUVInterface> |
306 yuv_readback_pipeline_; | 306 yuv_readback_pipeline_; |
307 | 307 |
308 scoped_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; | 308 scoped_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; |
309 }; | 309 }; |
310 | 310 |
311 } // namespace content | 311 } // namespace content |
312 | 312 |
313 #endif // CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ | 313 #endif // CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ |
OLD | NEW |