aboutsummaryrefslogtreecommitdiff
path: root/tests/ProcessorTest.cpp
diff options
context:
space:
mode:
authorKevin Lubick <kjlubick@google.com>2023-10-05 15:04:54 -0400
committerSkCQ <skcq-be@skia-corp.google.com.iam.gserviceaccount.com>2023-10-05 20:39:49 +0000
commit9b028376f9166aa35a7cf113a70d2fa64eec152c (patch)
treeb5d59ad09f8ad985a411aad9ab699dc3bdaf01e2 /tests/ProcessorTest.cpp
parentbe579dcde23b33c286fdf602fc38fc3ce99e21dc (diff)
downloadskia-9b028376f9166aa35a7cf113a70d2fa64eec152c.tar.gz
Split ToolUtils into a few files for easier modularization
The plan is to have a "test_base" module which all tests depend on, and then some other test modules that "tests who need pathops" or "tests that need a gpu" will depend on. test_base: deps [core_skia, base_skia] srcs [ToolUtils.h/cpp, ... test_ganesh_gl deps [test_base, ganesh_gl, core_skia, ...] srcs [GpuToolUtils.h/.cpp, ...] In theory, we could keep tool utils the way it is, and just change the deps, but that would involve some duplication of the test harnesses and I think will be a bit less neat. Bug: b/40045064 Change-Id: Ic4bce9df859d3f831c879cf17ac1608bc6612355 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/762976 Auto-Submit: Kevin Lubick <kjlubick@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com>
Diffstat (limited to 'tests/ProcessorTest.cpp')
-rw-r--r--tests/ProcessorTest.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/ProcessorTest.cpp b/tests/ProcessorTest.cpp
index a2b095fcd1..dd93cfc9a6 100644
--- a/tests/ProcessorTest.cpp
+++ b/tests/ProcessorTest.cpp
@@ -56,6 +56,7 @@
#include "tests/Test.h"
#include "tests/TestHarness.h"
#include "tests/TestUtils.h"
+#include "tools/EncodeUtils.h"
#include "tools/flags/CommandLineFlags.h"
#include <algorithm>
@@ -451,7 +452,7 @@ static bool log_pixels(GrColor* pixels, int widthHeight, SkString* dst) {
SkImageInfo::Make(widthHeight, widthHeight, kRGBA_8888_SkColorType, kLogAlphaType);
SkBitmap bmp;
bmp.installPixels(info, pixels, widthHeight * sizeof(GrColor));
- return BitmapToBase64DataURI(bmp, dst);
+ return ToolUtils::BitmapToBase64DataURI(bmp, dst);
}
static bool log_texture_view(GrDirectContext* dContext, GrSurfaceProxyView src, SkString* dst) {
@@ -462,7 +463,7 @@ static bool log_texture_view(GrDirectContext* dContext, GrSurfaceProxyView src,
SkBitmap bm;
SkAssertResult(bm.tryAllocPixels(ii));
SkAssertResult(sContext->readPixels(dContext, bm.pixmap(), {0, 0}));
- return BitmapToBase64DataURI(bm, dst);
+ return ToolUtils::BitmapToBase64DataURI(bm, dst);
}
static bool fuzzy_color_equals(const SkPMColor4f& c1, const SkPMColor4f& c2) {