Skip to content

Commit

Permalink
Fix typo in TestUtils function name
Browse files Browse the repository at this point in the history
Change-Id: I0648825ab7fdb8d9d74b3772fe3af58980b8c104
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/648617
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
  • Loading branch information
lhkbob authored and SkCQ committed Mar 6, 2023
1 parent 9279339 commit fea7089
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dm/DMSrcSink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1432,14 +1432,14 @@ static Result compare_bitmaps(const SkBitmap& reference, const SkBitmap& bitmap)
if (0 != memcmp(reference.getPixels(), bitmap.getPixels(), reference.computeByteSize())) {
SkString encoded;
SkString errString("Pixels don't match reference");
if (BipmapToBase64DataURI(reference, &encoded)) {
if (BitmapToBase64DataURI(reference, &encoded)) {
errString.append("\nExpected: ");
errString.append(encoded);
} else {
errString.append("\nExpected image failed to encode: ");
errString.append(encoded);
}
if (BipmapToBase64DataURI(bitmap, &encoded)) {
if (BitmapToBase64DataURI(bitmap, &encoded)) {
errString.append("\nActual: ");
errString.append(encoded);
} else {
Expand Down
4 changes: 2 additions & 2 deletions tests/ProcessorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,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 BipmapToBase64DataURI(bmp, dst);
return BitmapToBase64DataURI(bmp, dst);
}

static bool log_texture_view(GrDirectContext* dContext, GrSurfaceProxyView src, SkString* dst) {
Expand All @@ -456,7 +456,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 BipmapToBase64DataURI(bm, dst);
return BitmapToBase64DataURI(bm, dst);
}

static bool fuzzy_color_equals(const SkPMColor4f& c1, const SkPMColor4f& c2) {
Expand Down
2 changes: 1 addition & 1 deletion tests/TestUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ void TestCopyFromSurface(skiatest::Reporter* reporter,
TestReadPixels(reporter, dContext, dstContext.get(), expectedPixelValues, testName);
}

bool BipmapToBase64DataURI(const SkBitmap& bitmap, SkString* dst) {
bool BitmapToBase64DataURI(const SkBitmap& bitmap, SkString* dst) {
SkPixmap pm;
if (!bitmap.peekPixels(&pm)) {
dst->set("peekPixels failed");
Expand Down
2 changes: 1 addition & 1 deletion tests/TestUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void TestCopyFromSurface(skiatest::Reporter*,

// Encodes the bitmap into a data:/image/png;base64,... url suitable to view in a browser after
// printing to a log. If false is returned, dst holds an error message instead of a URI.
bool BipmapToBase64DataURI(const SkBitmap& bitmap, SkString* dst);
bool BitmapToBase64DataURI(const SkBitmap& bitmap, SkString* dst);

/** Used by compare_pixels. */
using ComparePixmapsErrorReporter = void(int x, int y, const float diffs[4]);
Expand Down

0 comments on commit fea7089

Please sign in to comment.