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

Side by Side Diff: components/viz/hittest/hittest.cc

Issue 2908783002: WIP Hittest Component.
Patch Set: format Created 3 years, 7 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 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_ = &regions_[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_ == &regions_[0]) {
45 current_regions_ = &regions_[1];
46 } else {
47 current_regions_ = &regions_[0];
48 }
49 }
50
51 } // namespace viz
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698