| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 const gfx::Rect& src_subrect, | 146 const gfx::Rect& src_subrect, |
| 147 const scoped_refptr<media::VideoFrame>& target, | 147 const scoped_refptr<media::VideoFrame>& target, |
| 148 const base::Callback<void(bool)>& callback); | 148 const base::Callback<void(bool)>& callback); |
| 149 bool CanCopyToVideoFrame() const; | 149 bool CanCopyToVideoFrame() const; |
| 150 bool CanSubscribeFrame() const; | 150 bool CanSubscribeFrame() const; |
| 151 void BeginFrameSubscription( | 151 void BeginFrameSubscription( |
| 152 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber); | 152 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber); |
| 153 void EndFrameSubscription(); | 153 void EndFrameSubscription(); |
| 154 bool HasFrameSubscriber() const { return frame_subscriber_; } | 154 bool HasFrameSubscriber() const { return frame_subscriber_; } |
| 155 uint32_t GetSurfaceIdNamespace(); | 155 uint32_t GetSurfaceIdNamespace(); |
| 156 // Returns a null SurfaceId if this DelegatedFrameHost has not yet created |
| 157 // a compositor Surface. |
| 156 cc::SurfaceId SurfaceIdAtPoint(const gfx::Point& point, | 158 cc::SurfaceId SurfaceIdAtPoint(const gfx::Point& point, |
| 157 gfx::Point* transformed_point); | 159 gfx::Point* transformed_point); |
| 158 | 160 |
| 159 // Exposed for tests. | 161 // Exposed for tests. |
| 160 cc::DelegatedFrameProvider* FrameProviderForTesting() const { | 162 cc::DelegatedFrameProvider* FrameProviderForTesting() const { |
| 161 return frame_provider_.get(); | 163 return frame_provider_.get(); |
| 162 } | 164 } |
| 163 cc::SurfaceId SurfaceIdForTesting() const { return surface_id_; } | 165 cc::SurfaceId SurfaceIdForTesting() const { return surface_id_; } |
| 164 void OnCompositingDidCommitForTesting(ui::Compositor* compositor) { | 166 void OnCompositingDidCommitForTesting(ui::Compositor* compositor) { |
| 165 OnCompositingDidCommit(compositor); | 167 OnCompositingDidCommit(compositor); |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 // YUV readback pipeline. | 336 // YUV readback pipeline. |
| 335 scoped_ptr<content::ReadbackYUVInterface> | 337 scoped_ptr<content::ReadbackYUVInterface> |
| 336 yuv_readback_pipeline_; | 338 yuv_readback_pipeline_; |
| 337 | 339 |
| 338 scoped_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; | 340 scoped_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; |
| 339 }; | 341 }; |
| 340 | 342 |
| 341 } // namespace content | 343 } // namespace content |
| 342 | 344 |
| 343 #endif // CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ | 345 #endif // CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_ |
| OLD | NEW |