Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1048)

Unified Diff: tests/CodexTest.cpp

Issue 1691823002: Test SkAndroidCodec for more types (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/CodexTest.cpp
diff --git a/tests/CodexTest.cpp b/tests/CodexTest.cpp
index 1261d2b5568ca9663d921d4ce40872d94e3dddf3..a365634126993e9bbf4dba303721dba54fe17292 100644
--- a/tests/CodexTest.cpp
+++ b/tests/CodexTest.cpp
@@ -137,9 +137,7 @@ static void test_codec(skiatest::Reporter* r, Codec* codec, SkBitmap& bm, const
}
}
-// FIXME: SkScaledCodec is currently only supported for types used by BRD
-// https://bug.skia.org/4428
-static bool supports_scaled_codec(const char path[]) {
+static bool supports_partial_scanlines(const char path[]) {
static const char* const exts[] = {
"jpg", "jpeg", "png", "webp"
"JPG", "JPEG", "PNG", "WEBP"
@@ -230,7 +228,7 @@ static void check(skiatest::Reporter* r,
== 0);
// Test partial scanline decodes
- if (supports_scaled_codec(path) && info.width() >= 3) {
+ if (supports_partial_scanlines(path) && info.width() >= 3) {
SkCodec::Options options;
int width = info.width();
int height = info.height();
@@ -287,8 +285,8 @@ static void check(skiatest::Reporter* r,
}
}
- // SkScaledCodec tests
- if ((supportsScanlineDecoding || supportsSubsetDecoding) && supports_scaled_codec(path)) {
+ // SkAndroidCodec tests
+ if (supportsScanlineDecoding || supportsSubsetDecoding) {
SkAutoTDelete<SkStream> stream(resource(path));
if (!stream) {
@@ -310,8 +308,8 @@ static void check(skiatest::Reporter* r,
}
SkBitmap bm;
- SkMD5::Digest scaledCodecDigest;
- test_codec(r, androidCodec.get(), bm, info, size, expectedResult, &scaledCodecDigest,
+ SkMD5::Digest androidCodecDigest;
+ test_codec(r, androidCodec.get(), bm, info, size, expectedResult, &androidCodecDigest,
&codecDigest);
}
@@ -518,7 +516,7 @@ DEF_TEST(Codec_leaks, r) {
}
DEF_TEST(Codec_null, r) {
- // Attempting to create an SkCodec or an SkScaledCodec with null should not
+ // Attempting to create an SkCodec or an SkAndroidCodec with null should not
// crash.
SkCodec* codec = SkCodec::NewFromStream(nullptr);
REPORTER_ASSERT(r, !codec);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698