| 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..121cb2220b93de45bf1ac41567d6417d1dc28c48
|
| --- /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 {
|
| + 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(
|
| + const hittest::mojom::HittestData& hittest_data) {
|
| + // add to pending
|
| +}
|
| +
|
| +void Hittest::Aggregate() {
|
| + // 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
|
|
|