aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar scroggo <scroggo@google.com>2016-02-11 10:24:55 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-02-11 10:24:55 -0800
commitbed1ed6eaced308149a05fecded14d8458c7d99c (patch)
treef4a6e568dc6476e07a3783b67ba3bbb76bd32e19 /tests
parentb8c97ba80be1276b79f18475600cee10c737cfbf (diff)
Test SkAndroidCodec for more types
Now that SkAndroidCodec supports all types, stop selectively running its tests for the types supported by BRD. For the tests that actually require BRD support (i.e. partial scanlines), change the method name from supports_scaled_codec to supports_partial_scanlines to be more accurate today. Use the name SkAndroidCodec instead of SkScaledCodec. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1691823002 Review URL: https://codereview.chromium.org/1691823002
Diffstat (limited to 'tests')
-rw-r--r--tests/CodexTest.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/tests/CodexTest.cpp b/tests/CodexTest.cpp
index 1aa3cdc4dd..0bd58935da 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);
}
@@ -519,7 +517,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);