#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "cc/paint/display_item_list.h"
#include <stddef.h>
#include <vector>
#include "base/logging.h"
#include "base/trace_event/traced_value.h"
#include "base/values.h"
#include "cc/paint/filter_operation.h"
#include "cc/paint/filter_operations.h"
#include "cc/paint/paint_canvas.h"
#include "cc/paint/paint_flags.h"
#include "cc/paint/paint_image_builder.h"
#include "cc/paint/paint_record.h"
#include "cc/paint/render_surface_filters.h"
#include "cc/paint/skia_paint_canvas.h"
#include "cc/test/pixel_test_utils.h"
#include "cc/test/skia_common.h"
#include "cc/test/test_skcanvas.h"
#include "skia/ext/font_utils.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkFont.h"
#include "third_party/skia/include/core/SkSurface.h"
#include "third_party/skia/include/core/SkTextBlob.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/rect_conversions.h"
#include "ui/gfx/geometry/skia_conversions.h"
#include "ui/gfx/geometry/transform.h"
namespace cc {
namespace {
bool CompareN32Pixels(void* actual_pixels,
void* expected_pixels,
int width,
int height) { … }
}
class DisplayItemListTest : public testing::Test { … };
#define EXPECT_TRACED_RECT(x, y, width, height, rect_list) …
TEST_F(DisplayItemListTest, TraceEmptyVisualRect) { … }
TEST_F(DisplayItemListTest, SingleUnpairedRange) { … }
TEST_F(DisplayItemListTest, EmptyUnpairedRangeDoesNotAddVisualRect) { … }
TEST_F(DisplayItemListTest, ClipPairedRange) { … }
TEST_F(DisplayItemListTest, TransformPairedRange) { … }
TEST_F(DisplayItemListTest, FilterPairedRange) { … }
TEST_F(DisplayItemListTest, BytesUsed) { … }
TEST_F(DisplayItemListTest, AsValueWithNoOps) { … }
TEST_F(DisplayItemListTest, AsValueWithOps) { … }
TEST_F(DisplayItemListTest, SizeEmpty) { … }
TEST_F(DisplayItemListTest, SizeOne) { … }
TEST_F(DisplayItemListTest, SizeMultiple) { … }
TEST_F(DisplayItemListTest, AppendVisualRectSimple) { … }
TEST_F(DisplayItemListTest, AppendVisualRectEmptyBlock) { … }
TEST_F(DisplayItemListTest, AppendVisualRectEmptyBlockContainingEmptyBlock) { … }
TEST_F(DisplayItemListTest, AppendVisualRectBlockContainingDrawing) { … }
TEST_F(DisplayItemListTest, AppendVisualRectBlockContainingEscapedDrawing) { … }
TEST_F(DisplayItemListTest,
AppendVisualRectDrawingFollowedByBlockContainingEscapedDrawing) { … }
TEST_F(DisplayItemListTest, AppendVisualRectTwoBlocksTwoDrawings) { … }
TEST_F(DisplayItemListTest,
AppendVisualRectTwoBlocksTwoDrawingsInnerDrawingEscaped) { … }
TEST_F(DisplayItemListTest,
AppendVisualRectTwoBlocksTwoDrawingsOuterDrawingEscaped) { … }
TEST_F(DisplayItemListTest,
AppendVisualRectTwoBlocksTwoDrawingsBothDrawingsEscaped) { … }
TEST_F(DisplayItemListTest, VisualRectForPairsEnclosingEmptyPainting) { … }
TEST_F(DisplayItemListTest, TotalOpCount) { … }
TEST_F(DisplayItemListTest, AreaOfDrawText) { … }
}