Index: components/viz/hittest/hittest.cc |
diff --git a/components/viz/hittest/hittest.cc b/components/viz/hittest/hittest.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..23ba574d5e4d71c2c8cd857611a839baebea3755 |
--- /dev/null |
+++ b/components/viz/hittest/hittest.cc |
@@ -0,0 +1,51 @@ |
+// Copyright 2017 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "components/viz/hittest/hittest.h" |
+ |
+#include "base/logging.h" |
+ |
+namespace viz { |
+ |
+struct Hittest::Region { |
rjkroege
2017/05/29 15:58:02
it's convention that stuff that never leaves the .
|
+ cc::SurfaceId surface_id; |
+ gfx::QuadF quad; |
+ unsigned int flags; |
+ int nChildren; |
+}; |
+ |
+Hittest* Hittest::instance_; |
+ |
+Hittest::Hittest() { |
+ current_regions_ = ®ions_[0]; |
+} |
+ |
+Hittest::~Hittest() {} |
+ |
+cc::SurfaceId Hittest::InternalGetSurfaceIdAtPoint( |
+ cc::SurfaceId root_surface_id, |
+ const gfx::Point& point, |
+ gfx::Point* transformed_point) { |
+ return root_surface_id; |
+} |
+ |
+void Hittest::SubmitHittestData( |
+ viz::hittest::mojom::HittestData& hittest_data) { |
+ // add to pending |
+} |
+ |
+void Hittest::Aggregate() { |
rjkroege
2017/05/29 15:58:02
I'd not have the empty entry point. Write the aggr
|
+ // todo: walk pending list and assemble into a _regions list |
+ swap(); |
+} |
+ |
+void Hittest::swap() { |
+ if (current_regions_ == ®ions_[0]) { |
+ current_regions_ = ®ions_[1]; |
+ } else { |
+ current_regions_ = ®ions_[0]; |
+ } |
+} |
+ |
+} // namespace viz |