| 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_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 // Returns a null SurfaceId if this DelegatedFrameHost has not yet created | 161 // Returns a null SurfaceId if this DelegatedFrameHost has not yet created |
| 162 // a compositor Surface. | 162 // a compositor Surface. |
| 163 cc::SurfaceId SurfaceIdAtPoint(cc::SurfaceHittestDelegate* delegate, | 163 cc::SurfaceId SurfaceIdAtPoint(cc::SurfaceHittestDelegate* delegate, |
| 164 const gfx::Point& point, | 164 const gfx::Point& point, |
| 165 gfx::Point* transformed_point); | 165 gfx::Point* transformed_point); |
| 166 | 166 |
| 167 // Given the SurfaceID of a Surface that is contained within this class' | 167 // Given the SurfaceID of a Surface that is contained within this class' |
| 168 // Surface, find the relative transform between the Surfaces and apply it | 168 // Surface, find the relative transform between the Surfaces and apply it |
| 169 // to a point. If a Surface has not yet been created this returns the | 169 // to a point. If a Surface has not yet been created this returns the |
| 170 // same point with no transform applied. | 170 // same point with no transform applied. |
| 171 void TransformPointToLocalCoordSpace(const gfx::Point& point, | 171 gfx::Point TransformPointToLocalCoordSpace( |
| 172 const cc::SurfaceId& original_surface, | 172 const gfx::Point& point, |
| 173 gfx::Point* transformed_point); | 173 const cc::SurfaceId& original_surface); |
| 174 |
| 175 // Given a RenderWidgetHostViewBase that renders to a Surface that is |
| 176 // contained within this class' Surface, find the relative transform between |
| 177 // the Surfaces and apply it to a point. If a Surface has not yet been |
| 178 // created this returns the same point with no transform applied. |
| 179 gfx::Point TransformPointToCoordSpaceForView( |
| 180 const gfx::Point& point, |
| 181 RenderWidgetHostViewBase* target_view); |
| 174 | 182 |
| 175 // Exposed for tests. | 183 // Exposed for tests. |
| 176 cc::SurfaceId SurfaceIdForTesting() const { return surface_id_; } | 184 cc::SurfaceId SurfaceIdForTesting() const { return surface_id_; } |
| 177 void OnCompositingDidCommitForTesting(ui::Compositor* compositor) { | 185 void OnCompositingDidCommitForTesting(ui::Compositor* compositor) { |
| 178 OnCompositingDidCommit(compositor); | 186 OnCompositingDidCommit(compositor); |
| 179 } | 187 } |
| 180 bool ReleasedFrontLockActiveForTesting() const { | 188 bool ReleasedFrontLockActiveForTesting() const { |
| 181 return !!released_front_lock_.get(); | 189 return !!released_front_lock_.get(); |
| 182 } | 190 } |
| 183 void SetRequestCopyOfOutputCallbackForTesting( | 191 void SetRequestCopyOfOutputCallbackForTesting( |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 // YUV readback pipeline. | 334 // YUV readback pipeline. |
| 327 std::unique_ptr<display_compositor::ReadbackYUVInterface> | 335 std::unique_ptr<display_compositor::ReadbackYUVInterface> |
| 328 yuv_readback_pipeline_; | 336 yuv_readback_pipeline_; |
| 329 | 337 |
| 330 std::unique_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; | 338 std::unique_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; |
| 331 }; | 339 }; |
| 332 | 340 |
| 333 } // namespace content | 341 } // namespace content |
| 334 | 342 |
| 335 #endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ | 343 #endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ |
| OLD | NEW |