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_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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 155 cc::FrameSinkId GetFrameSinkId(); | 155 cc::FrameSinkId GetFrameSinkId(); |
| 156 // Returns a null SurfaceId if this DelegatedFrameHost has not yet created | 156 // Returns a null SurfaceId if this DelegatedFrameHost has not yet created |
| 157 // a compositor Surface. | 157 // a compositor Surface. |
| 158 cc::SurfaceId SurfaceIdAtPoint(cc::SurfaceHittestDelegate* delegate, | 158 cc::SurfaceId SurfaceIdAtPoint(cc::SurfaceHittestDelegate* delegate, |
| 159 const gfx::Point& point, | 159 const gfx::Point& point, |
| 160 gfx::Point* transformed_point); | 160 gfx::Point* transformed_point); |
| 161 | 161 |
| 162 // Given the SurfaceID of a Surface that is contained within this class' | 162 // Given the SurfaceID of a Surface that is contained within this class' |
| 163 // Surface, find the relative transform between the Surfaces and apply it | 163 // Surface, find the relative transform between the Surfaces and apply it |
| 164 // to a point. If a Surface has not yet been created this returns the | 164 // to a point. If a Surface has not yet been created this returns the |
| 165 // same point with no transform applied. | 165 // same point with no transform applied. |
|
ncarter (slow)
2016/10/13 20:34:42
Update the comment, here and below.
kenrb
2016/10/14 13:02:43
Done.
| |
| 166 gfx::Point TransformPointToLocalCoordSpace( | 166 bool TransformPointToLocalCoordSpace(const gfx::Point& point, |
| 167 const gfx::Point& point, | 167 const cc::SurfaceId& original_surface, |
| 168 const cc::SurfaceId& original_surface); | 168 gfx::Point* transformed_point); |
| 169 | 169 |
| 170 // Given a RenderWidgetHostViewBase that renders to a Surface that is | 170 // Given a RenderWidgetHostViewBase that renders to a Surface that is |
| 171 // contained within this class' Surface, find the relative transform between | 171 // contained within this class' Surface, find the relative transform between |
| 172 // the Surfaces and apply it to a point. If a Surface has not yet been | 172 // the Surfaces and apply it to a point. If a Surface has not yet been |
| 173 // created this returns the same point with no transform applied. | 173 // created this returns the same point with no transform applied. |
| 174 gfx::Point TransformPointToCoordSpaceForView( | 174 bool TransformPointToCoordSpaceForView(const gfx::Point& point, |
| 175 const gfx::Point& point, | 175 RenderWidgetHostViewBase* target_view, |
| 176 RenderWidgetHostViewBase* target_view); | 176 gfx::Point* transformed_point); |
| 177 | 177 |
| 178 // Exposed for tests. | 178 // Exposed for tests. |
| 179 cc::SurfaceId SurfaceIdForTesting() const { | 179 cc::SurfaceId SurfaceIdForTesting() const { |
| 180 return cc::SurfaceId(frame_sink_id_, local_frame_id_); | 180 return cc::SurfaceId(frame_sink_id_, local_frame_id_); |
| 181 } | 181 } |
| 182 | 182 |
| 183 const cc::LocalFrameId& LocalFrameIdForTesting() const { | 183 const cc::LocalFrameId& LocalFrameIdForTesting() const { |
| 184 return local_frame_id_; | 184 return local_frame_id_; |
| 185 } | 185 } |
| 186 | 186 |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 337 // YUV readback pipeline. | 337 // YUV readback pipeline. |
| 338 std::unique_ptr<display_compositor::ReadbackYUVInterface> | 338 std::unique_ptr<display_compositor::ReadbackYUVInterface> |
| 339 yuv_readback_pipeline_; | 339 yuv_readback_pipeline_; |
| 340 | 340 |
| 341 std::unique_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; | 341 std::unique_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; |
| 342 }; | 342 }; |
| 343 | 343 |
| 344 } // namespace content | 344 } // namespace content |
| 345 | 345 |
| 346 #endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ | 346 #endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ |
| OLD | NEW |