Roll Skia and update display list tests (flutter/engine#33021)

This commit is contained in:
Brandon DeRosier
2022-04-29 21:16:29 -07:00
committed by GitHub
parent 0a84242538
commit cf5cd00b95
4 changed files with 44 additions and 40 deletions

2
DEPS
View File

@@ -27,7 +27,7 @@ vars = {
'skia_git': 'https://skia.googlesource.com',
# OCMock is for testing only so there is no google clone
'ocmock_git': 'https://github.com/erikdoe/ocmock.git',
'skia_revision': '4230297004399d21bd3c27bdba3bde1266103a1b',
'skia_revision': 'c987606ad2837e0b09f09d7af3d49587928369b8',
# WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY
# See `lib/web_ui/README.md` for how to roll CanvasKit to a new version.

View File

@@ -1,4 +1,4 @@
Signature: 9c79af045b36f7b5e34555c1528f8a42
Signature: 84c44579671ea575f550073a1ce2016d
UNUSED LICENSES:
@@ -785,7 +785,7 @@ FILE: ../../../third_party/skia/experimental/tskit/tsconfig.json
FILE: ../../../third_party/skia/experimental/wasm-hello-world/BUILD.bazel
FILE: ../../../third_party/skia/experimental/wasm-hello-world/hello_world.html
FILE: ../../../third_party/skia/experimental/webgpu-bazel/example/index.html
FILE: ../../../third_party/skia/experimental/webgpu-bazel/src/BUILD
FILE: ../../../third_party/skia/experimental/webgpu-bazel/src/BUILD.bazel
FILE: ../../../third_party/skia/gm/BUILD.bazel
FILE: ../../../third_party/skia/gm/verifiers/BUILD.bazel
FILE: ../../../third_party/skia/go.mod
@@ -4400,7 +4400,6 @@ FILE: ../../../third_party/skia/src/sksl/dsl/DSLVar.cpp
FILE: ../../../third_party/skia/src/sksl/dsl/priv/DSLWriter.cpp
FILE: ../../../third_party/skia/src/sksl/dsl/priv/DSLWriter.h
FILE: ../../../third_party/skia/src/sksl/ir/SkSLFunctionPrototype.h
FILE: ../../../third_party/skia/src/sksl/ir/SkSLInlineMarker.h
FILE: ../../../third_party/skia/src/sksl/ir/SkSLPrefixExpression.cpp
FILE: ../../../third_party/skia/src/sksl/ir/SkSLStructDefinition.h
FILE: ../../../third_party/skia/src/utils/SkCustomTypeface.cpp
@@ -7972,12 +7971,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
====================================================================================================
LIBRARY: skia
ORIGIN: ../../../third_party/skia/src/gpu/ganesh/ops/SmallPathRenderer.cpp + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/gpu/ganesh/dawn/GrDawnAsyncWait.cpp + ../../../third_party/skia/LICENSE
TYPE: LicenseType.bsd
FILE: ../../../third_party/skia/src/gpu/ganesh/ops/SmallPathRenderer.cpp
FILE: ../../../third_party/skia/src/gpu/ganesh/dawn/GrDawnAsyncWait.cpp
FILE: ../../../third_party/skia/src/gpu/ganesh/dawn/GrDawnAsyncWait.h
FILE: ../../../third_party/skia/src/gpu/tessellate/MidpointContourParser.h
FILE: ../../../third_party/skia/src/sksl/SkSLPosition.cpp
----------------------------------------------------------------------------------------------------
Copyright 2014 Google Inc.
Copyright 2017 ARM Ltd.
Copyright 2022 Google LLC.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -8010,12 +8011,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
====================================================================================================
LIBRARY: skia
ORIGIN: ../../../third_party/skia/src/gpu/tessellate/MidpointContourParser.h + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/gpu/ganesh/ops/SmallPathRenderer.cpp + ../../../third_party/skia/LICENSE
TYPE: LicenseType.bsd
FILE: ../../../third_party/skia/src/gpu/tessellate/MidpointContourParser.h
FILE: ../../../third_party/skia/src/sksl/SkSLPosition.cpp
FILE: ../../../third_party/skia/src/gpu/ganesh/ops/SmallPathRenderer.cpp
----------------------------------------------------------------------------------------------------
Copyright 2022 Google LLC.
Copyright 2014 Google Inc.
Copyright 2017 ARM Ltd.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are

View File

@@ -629,7 +629,8 @@ struct DrawSkVerticesOp final : DLOp {
}
};
// 4 byte header + 36 byte payload packs efficiently into 40 bytes
// 4 byte header + 40 byte payload uses 44 bytes but is rounded up to 48 bytes
// (4 bytes unused)
#define DEFINE_DRAW_IMAGE_OP(name, with_attributes) \
struct name##Op final : DLOp { \
static const auto kType = DisplayListOpType::k##name; \
@@ -651,7 +652,8 @@ DEFINE_DRAW_IMAGE_OP(DrawImage, false)
DEFINE_DRAW_IMAGE_OP(DrawImageWithAttr, true)
#undef DEFINE_DRAW_IMAGE_OP
// 4 byte header + 68 byte payload packs efficiently into 72 bytes
// 4 byte header + 72 byte payload uses 76 bytes but is rounded up to 80 bytes
// (4 bytes unused)
struct DrawImageRectOp final : DLOp {
static const auto kType = DisplayListOpType::kDrawImageRect;
@@ -753,7 +755,8 @@ struct DrawImageLatticeOp final : DLOp {
}
};
// 4 byte header + 36 byte common payload packs efficiently into 40 bytes
// 4 byte header + 40 byte payload uses 44 bytes but is rounded up to 48 bytes
// (4 bytes unused)
// Each of these is then followed by a number of lists.
// SkRSXform list is a multiple of 16 bytes so it is always packed well
// SkRect list is also a multiple of 16 bytes so it also packs well
@@ -781,7 +784,7 @@ struct DrawAtlasBaseOp : DLOp {
const sk_sp<DlImage> atlas;
};
// Packs as efficiently into 40 bytes as per DrawAtlasBaseOp
// Packs into 48 bytes as per DrawAtlasBaseOp
// with array data following the struct also as per DrawAtlasBaseOp
struct DrawAtlasOp final : DrawAtlasBaseOp {
static const auto kType = DisplayListOpType::kDrawAtlas;
@@ -810,7 +813,7 @@ struct DrawAtlasOp final : DrawAtlasBaseOp {
}
};
// Packs efficiently into the same 40 bytes as DrawAtlasBaseOp plus
// Packs into 48 bytes as per DrawAtlasBaseOp plus
// an additional 16 bytes for the cull rect resulting in a total
// of 56 bytes for the Culled drawAtlas.
// Also with array data following the struct as per DrawAtlasBaseOp
@@ -881,7 +884,7 @@ struct DrawSkPictureMatrixOp final : DLOp {
}
};
// 4 byte header + ptr aligned payload uses 12 bytes rounde up to 16
// 4 byte header + ptr aligned payload uses 12 bytes round up to 16
// (4 bytes unused)
struct DrawDisplayListOp final : DLOp {
static const auto kType = DisplayListOpType::kDrawDisplayList;

View File

@@ -664,29 +664,29 @@ std::vector<DisplayListInvocationGroup> allGroups = {
}
},
{ "DrawImage", {
{1, 40, -1, 40, [](DisplayListBuilder& b) {b.drawImage(TestImage1, {10, 10}, NearestSampling, false);}},
{1, 40, -1, 40, [](DisplayListBuilder& b) {b.drawImage(TestImage1, {10, 10}, NearestSampling, true);}},
{1, 40, -1, 40, [](DisplayListBuilder& b) {b.drawImage(TestImage1, {20, 10}, NearestSampling, false);}},
{1, 40, -1, 40, [](DisplayListBuilder& b) {b.drawImage(TestImage1, {10, 20}, NearestSampling, false);}},
{1, 40, -1, 40, [](DisplayListBuilder& b) {b.drawImage(TestImage1, {10, 10}, LinearSampling, false);}},
{1, 40, -1, 40, [](DisplayListBuilder& b) {b.drawImage(TestImage2, {10, 10}, NearestSampling, false);}},
{1, 48, -1, 48, [](DisplayListBuilder& b) {b.drawImage(TestImage1, {10, 10}, NearestSampling, false);}},
{1, 48, -1, 48, [](DisplayListBuilder& b) {b.drawImage(TestImage1, {10, 10}, NearestSampling, true);}},
{1, 48, -1, 48, [](DisplayListBuilder& b) {b.drawImage(TestImage1, {20, 10}, NearestSampling, false);}},
{1, 48, -1, 48, [](DisplayListBuilder& b) {b.drawImage(TestImage1, {10, 20}, NearestSampling, false);}},
{1, 48, -1, 48, [](DisplayListBuilder& b) {b.drawImage(TestImage1, {10, 10}, LinearSampling, false);}},
{1, 48, -1, 48, [](DisplayListBuilder& b) {b.drawImage(TestImage2, {10, 10}, NearestSampling, false);}},
}
},
{ "DrawImageRect", {
{1, 72, -1, 72, [](DisplayListBuilder& b) {b.drawImageRect(TestImage1, {10, 10, 20, 20}, {10, 10, 80, 80},
{1, 80, -1, 80, [](DisplayListBuilder& b) {b.drawImageRect(TestImage1, {10, 10, 20, 20}, {10, 10, 80, 80},
NearestSampling, false);}},
{1, 72, -1, 72, [](DisplayListBuilder& b) {b.drawImageRect(TestImage1, {10, 10, 20, 20}, {10, 10, 80, 80},
{1, 80, -1, 80, [](DisplayListBuilder& b) {b.drawImageRect(TestImage1, {10, 10, 20, 20}, {10, 10, 80, 80},
NearestSampling, true);}},
{1, 72, -1, 72, [](DisplayListBuilder& b) {b.drawImageRect(TestImage1, {10, 10, 20, 20}, {10, 10, 80, 80},
{1, 80, -1, 80, [](DisplayListBuilder& b) {b.drawImageRect(TestImage1, {10, 10, 20, 20}, {10, 10, 80, 80},
NearestSampling, false,
SkCanvas::SrcRectConstraint::kStrict_SrcRectConstraint);}},
{1, 72, -1, 72, [](DisplayListBuilder& b) {b.drawImageRect(TestImage1, {10, 10, 25, 20}, {10, 10, 80, 80},
{1, 80, -1, 80, [](DisplayListBuilder& b) {b.drawImageRect(TestImage1, {10, 10, 25, 20}, {10, 10, 80, 80},
NearestSampling, false);}},
{1, 72, -1, 72, [](DisplayListBuilder& b) {b.drawImageRect(TestImage1, {10, 10, 20, 20}, {10, 10, 85, 80},
{1, 80, -1, 80, [](DisplayListBuilder& b) {b.drawImageRect(TestImage1, {10, 10, 20, 20}, {10, 10, 85, 80},
NearestSampling, false);}},
{1, 72, -1, 72, [](DisplayListBuilder& b) {b.drawImageRect(TestImage1, {10, 10, 20, 20}, {10, 10, 80, 80},
{1, 80, -1, 80, [](DisplayListBuilder& b) {b.drawImageRect(TestImage1, {10, 10, 20, 20}, {10, 10, 80, 80},
LinearSampling, false);}},
{1, 72, -1, 72, [](DisplayListBuilder& b) {b.drawImageRect(TestImage2, {10, 10, 15, 15}, {10, 10, 80, 80},
{1, 80, -1, 80, [](DisplayListBuilder& b) {b.drawImageRect(TestImage2, {10, 10, 15, 15}, {10, 10, 80, 80},
NearestSampling, false);}},
}
},
@@ -750,49 +750,49 @@ std::vector<DisplayListInvocationGroup> allGroups = {
}
},
{ "DrawAtlas", {
{1, 40 + 32 + 32, -1, 40 + 32 + 32, [](DisplayListBuilder& b) {
{1, 48 + 32 + 32, -1, 48 + 32 + 32, [](DisplayListBuilder& b) {
static SkRSXform xforms[] = { {1, 0, 0, 0}, {0, 1, 0, 0} };
static SkRect texs[] = { { 10, 10, 20, 20 }, {20, 20, 30, 30} };
b.drawAtlas(TestImage1, xforms, texs, nullptr, 2, DlBlendMode::kSrcIn,
NearestSampling, nullptr, false);}},
{1, 40 + 32 + 32, -1, 40 + 32 + 32, [](DisplayListBuilder& b) {
{1, 48 + 32 + 32, -1, 48 + 32 + 32, [](DisplayListBuilder& b) {
static SkRSXform xforms[] = { {1, 0, 0, 0}, {0, 1, 0, 0} };
static SkRect texs[] = { { 10, 10, 20, 20 }, {20, 20, 30, 30} };
b.drawAtlas(TestImage1, xforms, texs, nullptr, 2, DlBlendMode::kSrcIn,
NearestSampling, nullptr, true);}},
{1, 40 + 32 + 32, -1, 40 + 32 + 32, [](DisplayListBuilder& b) {
{1, 48 + 32 + 32, -1, 48 + 32 + 32, [](DisplayListBuilder& b) {
static SkRSXform xforms[] = { {0, 1, 0, 0}, {0, 1, 0, 0} };
static SkRect texs[] = { { 10, 10, 20, 20 }, {20, 20, 30, 30} };
b.drawAtlas(TestImage1, xforms, texs, nullptr, 2, DlBlendMode::kSrcIn,
NearestSampling, nullptr, false);}},
{1, 40 + 32 + 32, -1, 40 + 32 + 32, [](DisplayListBuilder& b) {
{1, 48 + 32 + 32, -1, 48 + 32 + 32, [](DisplayListBuilder& b) {
static SkRSXform xforms[] = { {1, 0, 0, 0}, {0, 1, 0, 0} };
static SkRect texs[] = { { 10, 10, 20, 20 }, {20, 25, 30, 30} };
b.drawAtlas(TestImage1, xforms, texs, nullptr, 2, DlBlendMode::kSrcIn,
NearestSampling, nullptr, false);}},
{1, 40 + 32 + 32, -1, 40 + 32 + 32, [](DisplayListBuilder& b) {
{1, 48 + 32 + 32, -1, 48 + 32 + 32, [](DisplayListBuilder& b) {
static SkRSXform xforms[] = { {1, 0, 0, 0}, {0, 1, 0, 0} };
static SkRect texs[] = { { 10, 10, 20, 20 }, {20, 20, 30, 30} };
b.drawAtlas(TestImage1, xforms, texs, nullptr, 2, DlBlendMode::kSrcIn,
LinearSampling, nullptr, false);}},
{1, 40 + 32 + 32, -1, 40 + 32 + 32, [](DisplayListBuilder& b) {
{1, 48 + 32 + 32, -1, 48 + 32 + 32, [](DisplayListBuilder& b) {
static SkRSXform xforms[] = { {1, 0, 0, 0}, {0, 1, 0, 0} };
static SkRect texs[] = { { 10, 10, 20, 20 }, {20, 20, 30, 30} };
b.drawAtlas(TestImage1, xforms, texs, nullptr, 2, DlBlendMode::kDstIn,
NearestSampling, nullptr, false);}},
{1, 56 + 32 + 32, -1, 56 + 32 + 32, [](DisplayListBuilder& b) {
{1, 64 + 32 + 32, -1, 64 + 32 + 32, [](DisplayListBuilder& b) {
static SkRSXform xforms[] = { {1, 0, 0, 0}, {0, 1, 0, 0} };
static SkRect texs[] = { { 10, 10, 20, 20 }, {20, 20, 30, 30} };
static SkRect cullRect = { 0, 0, 200, 200 };
b.drawAtlas(TestImage2, xforms, texs, nullptr, 2, DlBlendMode::kSrcIn,
NearestSampling, &cullRect, false);}},
{1, 40 + 32 + 32 + 8, -1, 40 + 32 + 32 + 8, [](DisplayListBuilder& b) {
{1, 48 + 32 + 32 + 8, -1, 48 + 32 + 32 + 8, [](DisplayListBuilder& b) {
static SkRSXform xforms[] = { {1, 0, 0, 0}, {0, 1, 0, 0} };
static SkRect texs[] = { { 10, 10, 20, 20 }, {20, 20, 30, 30} };
static DlColor colors[] = { DlColor::kBlue(), DlColor::kGreen() };
b.drawAtlas(TestImage1, xforms, texs, colors, 2, DlBlendMode::kSrcIn,
NearestSampling, nullptr, false);}},
{1, 56 + 32 + 32 + 8, -1, 56 + 32 + 32 + 8, [](DisplayListBuilder& b) {
{1, 64 + 32 + 32 + 8, -1, 64 + 32 + 32 + 8, [](DisplayListBuilder& b) {
static SkRSXform xforms[] = { {1, 0, 0, 0}, {0, 1, 0, 0} };
static SkRect texs[] = { { 10, 10, 20, 20 }, {20, 20, 30, 30} };
static DlColor colors[] = { DlColor::kBlue(), DlColor::kGreen() };