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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 const ReadbackRequestCallback& callback, | 148 const ReadbackRequestCallback& callback, |
149 const SkColorType preferred_color_type); | 149 const SkColorType preferred_color_type); |
150 void CopyFromCompositingSurfaceToVideoFrame( | 150 void CopyFromCompositingSurfaceToVideoFrame( |
151 const gfx::Rect& src_subrect, | 151 const gfx::Rect& src_subrect, |
152 const scoped_refptr<media::VideoFrame>& target, | 152 const scoped_refptr<media::VideoFrame>& target, |
153 const base::Callback<void(const gfx::Rect&, bool)>& callback); | 153 const base::Callback<void(const gfx::Rect&, bool)>& callback); |
154 bool CanCopyToVideoFrame() const; | 154 bool CanCopyToVideoFrame() const; |
155 void BeginFrameSubscription( | 155 void BeginFrameSubscription( |
156 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber); | 156 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber); |
157 void EndFrameSubscription(); | 157 void EndFrameSubscription(); |
158 bool HasFrameSubscriber() const { return frame_subscriber_; } | 158 bool HasFrameSubscriber() const { return !!frame_subscriber_; } |
159 uint32_t GetSurfaceIdNamespace(); | 159 uint32_t GetSurfaceIdNamespace(); |
160 // Returns a null SurfaceId if this DelegatedFrameHost has not yet created | 160 // Returns a null SurfaceId if this DelegatedFrameHost has not yet created |
161 // a compositor Surface. | 161 // a compositor Surface. |
162 cc::SurfaceId SurfaceIdAtPoint(const gfx::Point& point, | 162 cc::SurfaceId SurfaceIdAtPoint(const gfx::Point& point, |
163 gfx::Point* transformed_point); | 163 gfx::Point* transformed_point); |
164 | 164 |
165 // Given the SurfaceID of a Surface that is contained within this class' | 165 // Given the SurfaceID of a Surface that is contained within this class' |
166 // Surface, find the relative transform between the Surfaces and apply it | 166 // Surface, find the relative transform between the Surfaces and apply it |
167 // to a point. If a Surface has not yet been created this returns the | 167 // to a point. If a Surface has not yet been created this returns the |
168 // same point with no transform applied. | 168 // same point with no transform applied. |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 // YUV readback pipeline. | 348 // YUV readback pipeline. |
349 scoped_ptr<content::ReadbackYUVInterface> | 349 scoped_ptr<content::ReadbackYUVInterface> |
350 yuv_readback_pipeline_; | 350 yuv_readback_pipeline_; |
351 | 351 |
352 scoped_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; | 352 scoped_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; |
353 }; | 353 }; |
354 | 354 |
355 } // namespace content | 355 } // namespace content |
356 | 356 |
357 #endif // CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ | 357 #endif // CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ |
OLD | NEW |