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/compositor/delegated_frame_host.h" | 5 #include "content/browser/compositor/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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 } | 200 } |
201 | 201 |
202 uint32_t DelegatedFrameHost::GetSurfaceIdNamespace() { | 202 uint32_t DelegatedFrameHost::GetSurfaceIdNamespace() { |
203 if (!use_surfaces_) | 203 if (!use_surfaces_) |
204 return 0; | 204 return 0; |
205 | 205 |
206 return id_allocator_->id_namespace(); | 206 return id_allocator_->id_namespace(); |
207 } | 207 } |
208 | 208 |
209 cc::SurfaceId DelegatedFrameHost::SurfaceIdAtPoint( | 209 cc::SurfaceId DelegatedFrameHost::SurfaceIdAtPoint( |
210 cc::SurfaceHittestDelegate* delegate, | |
211 const gfx::Point& point, | 210 const gfx::Point& point, |
212 gfx::Point* transformed_point) { | 211 gfx::Point* transformed_point) { |
213 if (surface_id_.is_null()) | 212 if (surface_id_.is_null()) |
214 return surface_id_; | 213 return surface_id_; |
215 cc::SurfaceHittest hittest(delegate, GetSurfaceManager()); | 214 cc::SurfaceHittest hittest(nullptr, GetSurfaceManager()); |
216 gfx::Transform target_transform; | 215 gfx::Transform target_transform; |
217 cc::SurfaceId target_surface_id = | 216 cc::SurfaceId target_surface_id = |
218 hittest.GetTargetSurfaceAtPoint(surface_id_, point, &target_transform); | 217 hittest.GetTargetSurfaceAtPoint(surface_id_, point, &target_transform); |
219 *transformed_point = point; | 218 *transformed_point = point; |
220 if (!target_surface_id.is_null()) | 219 if (!target_surface_id.is_null()) |
221 target_transform.TransformPoint(transformed_point); | 220 target_transform.TransformPoint(transformed_point); |
222 return target_surface_id; | 221 return target_surface_id; |
223 } | 222 } |
224 | 223 |
225 void DelegatedFrameHost::TransformPointToLocalCoordSpace( | 224 void DelegatedFrameHost::TransformPointToLocalCoordSpace( |
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1079 cc::SurfaceManager* manager = factory->GetSurfaceManager(); | 1078 cc::SurfaceManager* manager = factory->GetSurfaceManager(); |
1080 new_layer->SetShowSurface( | 1079 new_layer->SetShowSurface( |
1081 surface_id_, base::Bind(&SatisfyCallback, base::Unretained(manager)), | 1080 surface_id_, base::Bind(&SatisfyCallback, base::Unretained(manager)), |
1082 base::Bind(&RequireCallback, base::Unretained(manager)), | 1081 base::Bind(&RequireCallback, base::Unretained(manager)), |
1083 current_surface_size_, current_scale_factor_, | 1082 current_surface_size_, current_scale_factor_, |
1084 current_frame_size_in_dip_); | 1083 current_frame_size_in_dip_); |
1085 } | 1084 } |
1086 } | 1085 } |
1087 | 1086 |
1088 } // namespace content | 1087 } // namespace content |
OLD | NEW |