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 #include "content/browser/renderer_host/delegated_frame_host.h" | 5 #include "content/browser/renderer_host/delegated_frame_host.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 cc::SurfaceId target_surface_id = | 219 cc::SurfaceId target_surface_id = |
220 hittest.GetTargetSurfaceAtPoint(surface_id_, point, &target_transform); | 220 hittest.GetTargetSurfaceAtPoint(surface_id_, point, &target_transform); |
221 *transformed_point = point; | 221 *transformed_point = point; |
222 if (!target_surface_id.is_null()) | 222 if (!target_surface_id.is_null()) |
223 target_transform.TransformPoint(transformed_point); | 223 target_transform.TransformPoint(transformed_point); |
224 return target_surface_id; | 224 return target_surface_id; |
225 } | 225 } |
226 | 226 |
227 void DelegatedFrameHost::TransformPointToLocalCoordSpace( | 227 void DelegatedFrameHost::TransformPointToLocalCoordSpace( |
228 const gfx::Point& point, | 228 const gfx::Point& point, |
229 cc::SurfaceId original_surface, | 229 const cc::SurfaceId& original_surface, |
230 gfx::Point* transformed_point) { | 230 gfx::Point* transformed_point) { |
231 *transformed_point = point; | 231 *transformed_point = point; |
232 if (surface_id_.is_null() || original_surface == surface_id_) | 232 if (surface_id_.is_null() || original_surface == surface_id_) |
233 return; | 233 return; |
234 | 234 |
235 gfx::Transform transform; | 235 gfx::Transform transform; |
236 cc::SurfaceHittest hittest(nullptr, GetSurfaceManager()); | 236 cc::SurfaceHittest hittest(nullptr, GetSurfaceManager()); |
237 if (hittest.GetTransformToTargetSurface(surface_id_, original_surface, | 237 if (hittest.GetTransformToTargetSurface(surface_id_, original_surface, |
238 &transform) && | 238 &transform) && |
239 transform.GetInverse(&transform)) { | 239 transform.GetInverse(&transform)) { |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 cc::SurfaceManager* manager = factory->GetSurfaceManager(); | 902 cc::SurfaceManager* manager = factory->GetSurfaceManager(); |
903 new_layer->SetShowSurface( | 903 new_layer->SetShowSurface( |
904 surface_id_, base::Bind(&SatisfyCallback, base::Unretained(manager)), | 904 surface_id_, base::Bind(&SatisfyCallback, base::Unretained(manager)), |
905 base::Bind(&RequireCallback, base::Unretained(manager)), | 905 base::Bind(&RequireCallback, base::Unretained(manager)), |
906 current_surface_size_, current_scale_factor_, | 906 current_surface_size_, current_scale_factor_, |
907 current_frame_size_in_dip_); | 907 current_frame_size_in_dip_); |
908 } | 908 } |
909 } | 909 } |
910 | 910 |
911 } // namespace content | 911 } // namespace content |
OLD | NEW |