32 inline static constexpr int kWidth = 1024;
33 inline static constexpr int kHeight = 1024;
47 : fName(
"rectanizer_")
48 , fRectanizerType(rectanizerType)
49 , fRectType(rectType) {
78 SkASSERT(
nullptr == fRectanizer.get());
81 fRectanizer = std::make_unique<RectanizerPow2>(
kWidth,
kHeight);
84 fRectanizer = std::make_unique<RectanizerSkyline>(
kWidth,
kHeight);
93 for (
int i = 0; i < loops; ++i) {
105 if (!fRectanizer->addRect(size.fWidth, size.fHeight, &loc)) {
108 fRectanizer->reset();
113 fRectanizer->reset();
120 std::unique_ptr<Rectanizer> fRectanizer;
static uint32_t GrNextPow2(uint32_t n)
RectanizerBench(RectanizerType rectanizerType, RectType rectType)
void onDraw(int loops, SkCanvas *canvas) override
static constexpr int kHeight
@ kSkyline_RectanizerType
static constexpr int kWidth
const char * onGetName() override
void onDelayedSetup() override
bool isSuitableFor(Backend backend) override
uint32_t nextRangeU(uint32_t min, uint32_t max)
void append(const char text[])
const char * c_str() const
static constexpr SkISize Make(int32_t w, int32_t h)