5#include "flutter/flow/layers/offscreen_surface.h"
9#include "gtest/gtest.h"
16TEST(OffscreenSurfaceTest, EmptySurfaceIsInvalid) {
19 ASSERT_FALSE(
surface->IsValid());
22TEST(OffscreenSurfaceTest, OnexOneSurfaceIsValid) {
24 std::make_unique<OffscreenSurface>(
nullptr,
SkISize::Make(1, 1));
25 ASSERT_TRUE(
surface->IsValid());
28TEST(OffscreenSurfaceTest, PaintSurfaceBlack) {
30 std::make_unique<OffscreenSurface>(
nullptr,
SkISize::Make(1, 1));
36 auto raster_data =
surface->GetRasterData(
false);
37 const uint32_t* actual =
38 reinterpret_cast<const uint32_t*
>(raster_data->data());
41 ASSERT_EQ(actual[0], 0xFF000000u);
Developer-facing API for rendering anything within the engine.
void Clear(DlColor color)
TEST(DisplayListComplexity, EmptyDisplayList)
static constexpr SkISize MakeEmpty()
static constexpr SkISize Make(int32_t w, int32_t h)
static constexpr DlColor kBlack()