#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "components/viz/service/display/occlusion_culler.h"
#include <memory>
#include <optional>
#include <utility>
#include "cc/base/math_util.h"
#include "components/viz/common/display/renderer_settings.h"
#include "components/viz/common/frame_sinks/copy_output_request.h"
#include "components/viz/common/quads/aggregated_render_pass_draw_quad.h"
#include "components/viz/common/quads/solid_color_draw_quad.h"
#include "components/viz/service/display/overlay_processor_interface.h"
#include "components/viz/service/display/overlay_processor_stub.h"
#include "components/viz/test/compositor_frame_helpers.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/geometry/rect.h"
namespace viz {
namespace {
constexpr float kDefaultDeviceScaleFactor = …;
size_t NumVisibleRects(const QuadList& quads) { … }
class OcclusionCullerTest : public testing::Test { … };
TEST_F(OcclusionCullerTest, OcclusionCullingWithBlending) { … }
TEST_F(OcclusionCullerTest, OcclusionCullingWithIntersectingBackdropFilter) { … }
TEST_F(OcclusionCullerTest, OcclusionCullingWithNonCoveringDrawQuad) { … }
TEST_F(OcclusionCullerTest,
OcclusionCullingWithSingleOverlapBehindDisjointedDrawQuads) { … }
TEST_F(OcclusionCullerTest,
OcclusionCullingWithMultipleOverlapBehindDisjointedDrawQuads) { … }
TEST_F(OcclusionCullerTest, CompositorFrameWithOverlapDrawQuad) { … }
TEST_F(OcclusionCullerTest, CompositorFrameWithTransformer) { … }
TEST_F(OcclusionCullerTest, CompositorFrameWithEpsilonScaleTransform) { … }
TEST_F(OcclusionCullerTest, CompositorFrameWithNegativeScaleTransform) { … }
TEST_F(OcclusionCullerTest, CompositorFrameWithRotation) { … }
TEST_F(OcclusionCullerTest, CompositorFrameWithPerspective) { … }
TEST_F(OcclusionCullerTest, CompositorFrameWithOpacityChange) { … }
TEST_F(OcclusionCullerTest, CompositorFrameWithOpaquenessChange) { … }
TEST_F(OcclusionCullerTest, CompositorFrameZTranslate) { … }
TEST_F(OcclusionCullerTest, CompositorFrameWithTranslateTransformer) { … }
TEST_F(OcclusionCullerTest, CompositorFrameWithCombinedSharedQuadState) { … }
TEST_F(OcclusionCullerTest, OcclusionCullingWithMultipleRenderPass) { … }
TEST_F(OcclusionCullerTest, CompositorFrameWithMultipleRenderPass) { … }
TEST_F(OcclusionCullerTest, CompositorFrameWithCoveredRenderPass) { … }
TEST_F(OcclusionCullerTest, CompositorFrameWithClip) { … }
TEST_F(OcclusionCullerTest, CompositorFrameWithCopyRequest) { … }
TEST_F(OcclusionCullerTest, CompositorFrameWithRenderPass) { … }
TEST_F(OcclusionCullerTest,
CompositorFrameWithMultipleDrawQuadInSharedQuadState) { … }
TEST_F(OcclusionCullerTest, CompositorFrameWithNonInvertibleTransform) { … }
TEST_F(OcclusionCullerTest, OcclusionCullingWithLargeDrawQuad) { … }
TEST_F(OcclusionCullerTest, OcclusionCullingWithRoundedCornerDoesNotOcclude) { … }
TEST_F(OcclusionCullerTest, OcclusionCullingWithRoundedCornerDoesNotOccludeY) { … }
TEST_F(OcclusionCullerTest, OcclusionCullingWithRoundedCornerDoesNotOccludeX) { … }
TEST_F(OcclusionCullerTest, OcclusionCullingWithRoundedCornerDoesOcclude) { … }
TEST_F(OcclusionCullerTest, OcclusionCullingWithRoundedCornerDoesOccludeXY) { … }
TEST_F(OcclusionCullerTest, OcclusionCullingSplit) { … }
TEST_F(OcclusionCullerTest, FirstPassVisibleComplexityReduction) { … }
TEST_F(OcclusionCullerTest, OcclusionCullingWithRoundedCornerPartialOcclude) { … }
TEST_F(OcclusionCullerTest, OcclusionCullingSplitDeviceScaleFactorFractional) { … }
}
}