chromium/cc/tiles/picture_layer_tiling_unittest.cc

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

#include "cc/tiles/picture_layer_tiling.h"

#include <stddef.h>

#include <limits>
#include <set>

#include "base/functional/bind.h"
#include "base/memory/ptr_util.h"
#include "cc/base/math_util.h"
#include "cc/test/fake_output_surface_client.h"
#include "cc/test/fake_picture_layer_tiling_client.h"
#include "cc/test/fake_raster_source.h"
#include "cc/tiles/picture_layer_tiling_set.h"
#include "cc/trees/layer_tree_settings.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/geometry/quad_f.h"
#include "ui/gfx/geometry/rect_conversions.h"
#include "ui/gfx/geometry/size_conversions.h"

namespace cc {
namespace {

static gfx::Rect ViewportInLayerSpace(
    const gfx::Transform& transform,
    const gfx::Size& device_viewport) {}

class TestablePictureLayerTiling : public PictureLayerTiling {};

class PictureLayerTilingIteratorTest : public testing::Test {};

TEST_F(PictureLayerTilingIteratorTest, ResizeLayer) {}

TEST_F(PictureLayerTilingIteratorTest, RecordedBoundsChange) {}

TEST_F(PictureLayerTilingIteratorTest, CreateMissingTilesStaysInsideLiveRect) {}

TEST_F(PictureLayerTilingIteratorTest, ResizeTilingOverTileBorders) {}

TEST_F(PictureLayerTilingIteratorTest, ResizeLiveTileRectOverTileBorders) {}

TEST_F(PictureLayerTilingIteratorTest, ShrinkWidthExpandHeightTilingRect) {}

TEST_F(PictureLayerTilingIteratorTest, ResizeLiveTileRectOverSameTiles) {}

TEST_F(PictureLayerTilingIteratorTest, ResizeLayerOverBorderPixels) {}

TEST_F(PictureLayerTilingIteratorTest, RemoveOutsideLayerKeepsTiles) {}

TEST_F(PictureLayerTilingIteratorTest, CreateTileJustCoverBorderUp) {}

TEST_F(PictureLayerTilingIteratorTest, LiveTilesExactlyCoverLiveTileRect) {}

TEST_F(PictureLayerTilingIteratorTest, IteratorCoversLayerBoundsNoScale) {}

TEST_F(PictureLayerTilingIteratorTest, IteratorCoversLayerBoundsTilingScale) {}

TEST_F(PictureLayerTilingIteratorTest, IteratorCoversLayerBoundsBothScale) {}

TEST_F(PictureLayerTilingIteratorTest, IteratorEmptyRect) {}

TEST_F(PictureLayerTilingIteratorTest, NonIntersectingRect) {}

TEST_F(PictureLayerTilingIteratorTest, LayerEdgeTextureCoordinates) {}

TEST_F(PictureLayerTilingIteratorTest, NonContainedDestRect) {}

static void TileExists(bool exists, Tile* tile,
                       const gfx::Rect& geometry_rect) {}

TEST_F(PictureLayerTilingIteratorTest, TilesExist) {}

TEST_F(PictureLayerTilingIteratorTest, TilesExistGiantViewport) {}

TEST_F(PictureLayerTilingIteratorTest, TilesExistOutsideViewport) {}

static void TilesIntersectingRectExist(const gfx::Rect& rect,
                                       bool intersect_exists,
                                       Tile* tile,
                                       const gfx::Rect& geometry_rect) {}

TEST_F(PictureLayerTilingIteratorTest,
       TilesExistLargeViewportAndLayerWithSmallVisibleArea) {}

TEST(ComputeTilePriorityRectsTest, VisibleTiles) {}

TEST(ComputeTilePriorityRectsTest, OffscreenTiles) {}

TEST(ComputeTilePriorityRectsTest, PartiallyOffscreenLayer) {}

TEST(PictureLayerTilingTest, RecycledTilesClearedOnReset) {}

TEST(PictureLayerTilingTest, EdgeCaseTileNowAndRequired) {}

TEST_F(PictureLayerTilingIteratorTest, ResizeTilesAndUpdateToCurrent) {}

// This test runs into floating point issues because of big numbers.
TEST_F(PictureLayerTilingIteratorTest, GiantRect) {}

TEST_F(PictureLayerTilingIteratorTest, QuadShouldNotUseLastHalfTexel) {}

static void TileHasGeometryRect(const gfx::Rect& expected_rect,
                                Tile* tile,
                                const gfx::Rect& geometry_rect) {}

TEST_F(PictureLayerTilingIteratorTest, UseLeastTilesToCover) {}

TEST_F(PictureLayerTilingIteratorTest, UseLeastTilesToCover2) {}

TEST_F(PictureLayerTilingIteratorTest, TightCover) {}

TEST_F(PictureLayerTilingIteratorTest, TightCover2) {}

TEST_F(PictureLayerTilingIteratorTest, TilesStoreTilings) {}

TEST_F(PictureLayerTilingIteratorTest, FractionalTranslatedTiling) {}

TEST_F(PictureLayerTilingIteratorTest,
       FractionalTranslatedTilingPartiallyFilled) {}

TEST_F(PictureLayerTilingIteratorTest, FractionalTranslatedTilingOverflow) {}

TEST_F(PictureLayerTilingIteratorTest, EdgeCaseLargeIntBounds) {}

TEST_F(PictureLayerTilingIteratorTest, EdgeCaseLargeIntBounds2) {}

TEST_F(PictureLayerTilingIteratorTest, SmallRasterTransforms) {}

TEST_F(PictureLayerTilingIteratorTest, TilingSizeChange) {}

TEST_F(PictureLayerTilingIteratorTest, LiveTilesRectChange) {}

TEST_F(PictureLayerTilingIteratorTest,
       ComputeTilePriorityRectsAllowPrepaintOnly) {}

}  // namespace
}  // namespace cc