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

Side by Side Diff: cc/surfaces/surface_hittest.h

Issue 1265013003: Adds support for hittesting points on surface quads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: recursing into RenderPassDrawQuads, checking for clipped_rect, checking for occluded quads Created 5 years, 4 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
(Empty)
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.
4
5 #ifndef CC_SURFACES_SURFACE_HITTEST_H_
6 #define CC_SURFACES_SURFACE_HITTEST_H_
7
8 #include <set>
9
10 #include "cc/surfaces/surface_id.h"
11 #include "cc/surfaces/surfaces_export.h"
12
13 namespace gfx {
14 class Point;
15 }
16
17 namespace cc {
18 class RenderPass;
19 class SurfaceManager;
20
21 // Performs a hittest in surface quads.
22 class CC_SURFACES_EXPORT SurfaceHittest {
23 public:
24 explicit SurfaceHittest(SurfaceManager* manager);
25 ~SurfaceHittest();
26
27 // Hittests against Surface with SurfaceId |surface_id|, return the contained
28 // surface that the point is hitting and the |transformed_point| in the
29 // surface space.
30 SurfaceId Hittest(SurfaceId surface_id,
31 const gfx::Point& point,
32 gfx::Point* transformed_point);
33
34 private:
35 SurfaceId HittestInternal(SurfaceId surface_id,
36 const RenderPass* render_pass,
37 const gfx::Point& point,
38 gfx::Point* out_transformed_point);
39
40 SurfaceManager* const manager_;
41 std::set<SurfaceId> referenced_surfaces_;
42 };
43 } // namespace cc
44
45 #endif // CC_SURFACES_SURFACE_HITTEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698