Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 86f9559

Browse files
committed
GoldenTest tests
1 parent a43b69e commit 86f9559

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

impeller/golden_tests/golden_tests.cc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <sstream>
88

99
#include "flutter/fml/platform/darwin/scoped_nsautorelease_pool.h"
10+
#include "impeller/aiks/aiks_context.h"
1011
#include "impeller/aiks/canvas.h"
1112
#include "impeller/entity/contents/conical_gradient_contents.h"
1213
#include "impeller/geometry/path_builder.h"
@@ -56,7 +57,7 @@ class GoldenTests : public ::testing::Test {
5657
void SetUp() override {
5758
testing::GoldenDigest::Instance()->AddDimension(
5859
"gpu_string",
59-
Screenshoter().GetAiksContext().GetContext()->DescribeGpuModel());
60+
Screenshoter().GetPlayground().GetContext()->DescribeGpuModel());
6061
}
6162

6263
private:
@@ -79,7 +80,10 @@ TEST_F(GoldenTests, ConicalGradient) {
7980
paint.style = Paint::Style::kFill;
8081
canvas.DrawRect(Rect(10, 10, 250, 250), paint);
8182
Picture picture = canvas.EndRecordingAsPicture();
82-
auto screenshot = Screenshoter().MakeScreenshot(picture);
83+
84+
auto aiks_context =
85+
AiksContext(Screenshoter().GetPlayground().GetContext(), nullptr);
86+
auto screenshot = Screenshoter().MakeScreenshot(aiks_context, picture);
8387
ASSERT_TRUE(SaveScreenshot(std::move(screenshot)));
8488
}
8589
} // namespace testing

0 commit comments

Comments
 (0)