chromium/components/viz/service/display/bsp_tree.cc

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/viz/service/display/bsp_tree.h"

#include <memory>
#include <utility>
#include <vector>

#include "base/containers/circular_deque.h"
#include "cc/base/container_util.h"
#include "components/viz/service/display/bsp_compare_result.h"
#include "components/viz/service/display/draw_polygon.h"

namespace viz {

BspNode::BspNode(std::unique_ptr<DrawPolygon> data)
    :{}

BspNode::~BspNode() = default;

BspTree::BspTree(base::circular_deque<std::unique_ptr<DrawPolygon>>* list) {}

BspTree::~BspTree() = default;

// The idea behind using a deque for BuildTree's input is that we want to be
// able to place polygons that we've decided aren't splitting plane candidates
// at the back of the queue while moving the candidate splitting planes to the
// front when the heuristic decides that they're a better choice. This way we
// can always simply just take from the front of the deque for our node's
// data.
void BspTree::BuildTree(
    BspNode* node,
    base::circular_deque<std::unique_ptr<DrawPolygon>>* polygon_list) {}

// The base comparer with 0,0,0 as camera position facing forward
BspCompareResult BspTree::GetCameraPositionRelative(const DrawPolygon& node) {}

}  // namespace viz