OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 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 #include "components/viz/hittest/hittest.h" | |
6 | |
7 #include "base/logging.h" | |
8 | |
9 namespace viz { | |
10 | |
11 struct Hittest::Region { | |
rjkroege
2017/05/29 15:58:02
it's convention that stuff that never leaves the .
| |
12 cc::SurfaceId surface_id; | |
13 gfx::QuadF quad; | |
14 unsigned int flags; | |
15 int nChildren; | |
16 }; | |
17 | |
18 Hittest* Hittest::instance_; | |
19 | |
20 Hittest::Hittest() { | |
21 current_regions_ = ®ions_[0]; | |
22 } | |
23 | |
24 Hittest::~Hittest() {} | |
25 | |
26 cc::SurfaceId Hittest::InternalGetSurfaceIdAtPoint( | |
27 cc::SurfaceId root_surface_id, | |
28 const gfx::Point& point, | |
29 gfx::Point* transformed_point) { | |
30 return root_surface_id; | |
31 } | |
32 | |
33 void Hittest::SubmitHittestData( | |
34 viz::hittest::mojom::HittestData& hittest_data) { | |
35 // add to pending | |
36 } | |
37 | |
38 void Hittest::Aggregate() { | |
rjkroege
2017/05/29 15:58:02
I'd not have the empty entry point. Write the aggr
| |
39 // todo: walk pending list and assemble into a _regions list | |
40 swap(); | |
41 } | |
42 | |
43 void Hittest::swap() { | |
44 if (current_regions_ == ®ions_[0]) { | |
45 current_regions_ = ®ions_[1]; | |
46 } else { | |
47 current_regions_ = ®ions_[0]; | |
48 } | |
49 } | |
50 | |
51 } // namespace viz | |
OLD | NEW |