| Index: components/viz/hittest/hittest_aggregator.cc
|
| diff --git a/components/viz/hittest/hittest_aggregator.cc b/components/viz/hittest/hittest_aggregator.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c706538a5d8fa2ee26b0a784b05dc2b36dabad20
|
| --- /dev/null
|
| +++ b/components/viz/hittest/hittest_aggregator.cc
|
| @@ -0,0 +1,38 @@
|
| +// 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_aggregator.h"
|
| +#include "base/logging.h"
|
| +#include "display_hittest_data.h"
|
| +
|
| +namespace viz {
|
| +
|
| +HittestAggregator::HittestAggregator() {}
|
| +HittestAggregator::~HittestAggregator() {}
|
| +
|
| +cc::SurfaceId HittestAggregator::SurfaceIdAtPoint(
|
| + cc::SurfaceId root_surface_id,
|
| + const gfx::Point& point,
|
| + gfx::Point* transformed_point) {
|
| + return root_surface_id;
|
| +}
|
| +
|
| +void HittestAggregator::SubmitHittestData(
|
| + hittest::mojom::HittestDataPtr hittest_data) {
|
| + pending_[hittest_data->surface_id_] = std::move(hittest_data);
|
| +}
|
| +
|
| +void HittestAggregator::Aggregate(cc::SurfaceId display_surface_id) {
|
| + display_hittest_data_->Build(active_, display_surface_id);
|
| +}
|
| +
|
| +void HittestAggregator::OnSurfaceDiscarded(const cc::SurfaceId& surface_id) {
|
| + pending_.erase(surface_id);
|
| + active_.erase(surface_id);
|
| +}
|
| +void HittestAggregator::OnSurfaceWillDraw(const cc::SurfaceId& surface_id) {
|
| + active_[surface_id] = std::move(pending_[surface_id]);
|
| +}
|
| +
|
| +} // namespace viz
|
|
|