chromium/third_party/skia/src/gpu/RectanizerPow2.h

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

#ifndef skgpu_RectanizerPow2_DEFINED
#define skgpu_RectanizerPow2_DEFINED

#include "include/private/base/SkAssert.h"
#include "include/private/base/SkMalloc.h"
#include "src/base/SkMathPriv.h"
#include "src/core/SkIPoint16.h"
#include "src/gpu/Rectanizer.h"

#include <cstdint>

namespace skgpu {

// This Rectanizer quantizes the incoming rects to powers of 2. Each power
// of two can have, at most, one active row/shelf. Once a row/shelf for
// a particular power of two gets full its fRows entry is recycled to point
// to a new row.
// The skyline algorithm almost always provides a better packing.
//
// Mark this class final in an effort to avoid the vtable when this subclass is used explicitly.
class RectanizerPow2 final : public Rectanizer {};

} // End of namespace skgpu

#endif