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_aggregator.h" |
| 6 #include "base/logging.h" |
| 7 #include "display_hittest_data.h" |
| 8 |
| 9 namespace viz { |
| 10 |
| 11 HittestAggregator::HittestAggregator() {} |
| 12 HittestAggregator::~HittestAggregator() {} |
| 13 |
| 14 cc::SurfaceId HittestAggregator::SurfaceIdAtPoint( |
| 15 cc::SurfaceId root_surface_id, |
| 16 const gfx::Point& point, |
| 17 gfx::Point* transformed_point) { |
| 18 return root_surface_id; |
| 19 } |
| 20 |
| 21 void HittestAggregator::SubmitHittestData( |
| 22 hittest::mojom::HittestDataPtr hittest_data) { |
| 23 pending_[hittest_data->surface_id_] = std::move(hittest_data); |
| 24 } |
| 25 |
| 26 void HittestAggregator::Aggregate(cc::SurfaceId display_surface_id) { |
| 27 display_hittest_data_->Build(active_, display_surface_id); |
| 28 } |
| 29 |
| 30 void HittestAggregator::OnSurfaceDiscarded(const cc::SurfaceId& surface_id) { |
| 31 pending_.erase(surface_id); |
| 32 active_.erase(surface_id); |
| 33 } |
| 34 void HittestAggregator::OnSurfaceWillDraw(const cc::SurfaceId& surface_id) { |
| 35 active_[surface_id] = std::move(pending_[surface_id]); |
| 36 } |
| 37 |
| 38 } // namespace viz |
OLD | NEW |