chromium/third_party/skia/src/gpu/tessellate/CullTest.h

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

#ifndef skgpu_tessellate_CullTest_DEFINED
#define skgpu_tessellate_CullTest_DEFINED

#include "include/core/SkMatrix.h"
#include "include/core/SkPoint.h"
#include "include/core/SkRect.h"
#include "include/private/base/SkAssert.h"
#include "src/base/SkVx.h"

namespace skgpu::tess {

// This class determines whether the given local-space points will be contained in the cull bounds
// post transform. For the versions that take >1 point, it returns whether any region of their
// device-space bounding box will be in the cull bounds.
//
// NOTE: Our view matrix is not a normal matrix. M*p maps to the float4 [x, y, -x, -y] in device
// space. We do this to aid in quick bounds calculations. The matrix also does not have a
// translation element. Instead we unapply the translation to the cull bounds ahead of time.
class CullTest {};

}  // namespace skgpu::tess

#endif  // skgpu_tessellate_CullTest_DEFINED