blob: db0b270dd56c1aff2f15805ed6f67ccda6b518c9 [file]
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef FLUTTER_FLOW_VIEW_SLICER_H_
#define FLUTTER_FLOW_VIEW_SLICER_H_
#include <unordered_map>
#include <unordered_set>
#include "display_list/dl_canvas.h"
#include "flow/embedded_views.h"
namespace flutter {
/// @brief Compute the required overlay layers and clip the view slices
/// according to the size and position of the platform views.
/// @param views_with_underlay_preserved The platform view IDs for which we
/// should not subtract the overlap from the background canvas.
std::unordered_map<int64_t, DlRect> SliceViews(
DlCanvas* background_canvas,
const std::vector<int64_t>& composition_order,
const std::unordered_map<int64_t, std::unique_ptr<EmbedderViewSlice>>&
slices,
const std::unordered_map<int64_t, DlRect>& view_rects,
const std::unordered_set<int64_t>& views_with_underlay_preserved);
} // namespace flutter
#endif // FLUTTER_FLOW_VIEW_SLICER_H_