1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CC_SURFACES_SURFACE_HITTEST_H_
6 #define CC_SURFACES_SURFACE_HITTEST_H_
10 #include "cc/surfaces/surface_id.h"
11 #include "cc/surfaces/surfaces_export.h"
21 // Performs a hittest in surface quads.
22 class CC_SURFACES_EXPORT SurfaceHittest
{
24 explicit SurfaceHittest(SurfaceManager
* manager
);
27 // Hittests against Surface with SurfaceId |surface_id|, return the contained
28 // surface that the point is hitting and the |transformed_point| in the
30 SurfaceId
Hittest(SurfaceId surface_id
,
31 const gfx::Point
& point
,
32 gfx::Point
* transformed_point
);
35 bool HittestInternal(SurfaceId surface_id
,
36 const RenderPass
* render_pass
,
37 const gfx::Point
& point
,
38 SurfaceId
* out_surface_id
,
39 gfx::Point
* out_transformed_point
);
41 SurfaceManager
* const manager_
;
42 std::set
<const RenderPass
*> referenced_passes_
;
46 #endif // CC_SURFACES_SURFACE_HITTEST_H_