Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(886)

Side by Side Diff: content/browser/renderer_host/delegated_frame_host.h

Issue 2417463003: Account for failure of coordinate space transformations in browser (Closed)
Patch Set: Review comments addressed Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 bool HasFrameSubscriber() const { return !!frame_subscriber_; } 154 bool HasFrameSubscriber() const { return !!frame_subscriber_; }
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. Returns false if a Surface has not yet been created or if
165 // same point with no transform applied. 165 // |original_surface| is not embedded within our current Surface.
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. Returns false if a Surface has not
173 // created this returns the same point with no transform applied. 173 // yet been created or if |target_view| is not a descendant RWHV from our
174 gfx::Point TransformPointToCoordSpaceForView( 174 // client.
175 const gfx::Point& point, 175 bool TransformPointToCoordSpaceForView(const gfx::Point& point,
176 RenderWidgetHostViewBase* target_view); 176 RenderWidgetHostViewBase* target_view,
177 gfx::Point* transformed_point);
177 178
178 // Exposed for tests. 179 // Exposed for tests.
179 cc::SurfaceId SurfaceIdForTesting() const { 180 cc::SurfaceId SurfaceIdForTesting() const {
180 return cc::SurfaceId(frame_sink_id_, local_frame_id_); 181 return cc::SurfaceId(frame_sink_id_, local_frame_id_);
181 } 182 }
182 183
183 const cc::LocalFrameId& LocalFrameIdForTesting() const { 184 const cc::LocalFrameId& LocalFrameIdForTesting() const {
184 return local_frame_id_; 185 return local_frame_id_;
185 } 186 }
186 187
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 // YUV readback pipeline. 338 // YUV readback pipeline.
338 std::unique_ptr<display_compositor::ReadbackYUVInterface> 339 std::unique_ptr<display_compositor::ReadbackYUVInterface>
339 yuv_readback_pipeline_; 340 yuv_readback_pipeline_;
340 341
341 std::unique_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; 342 std::unique_ptr<DelegatedFrameEvictor> delegated_frame_evictor_;
342 }; 343 };
343 344
344 } // namespace content 345 } // namespace content
345 346
346 #endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ 347 #endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698