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

Side by Side Diff: tests/CodexTest.cpp

Issue 1044433002: Add SkWebpCodec, for decoding .webp images. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix conversion from float to int. Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « src/codec/SkWebpCodec.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "Resources.h" 8 #include "Resources.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCodec.h" 10 #include "SkCodec.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 REPORTER_ASSERT(r, digest3 == digest1); 82 REPORTER_ASSERT(r, digest3 == digest1);
83 } else { 83 } else {
84 REPORTER_ASSERT(r, !scanlineDecoder); 84 REPORTER_ASSERT(r, !scanlineDecoder);
85 } 85 }
86 } 86 }
87 87
88 DEF_TEST(Codec, r) { 88 DEF_TEST(Codec, r) {
89 // WBMP 89 // WBMP
90 check(r, "mandrill.wbmp", SkISize::Make(512, 512), false); 90 check(r, "mandrill.wbmp", SkISize::Make(512, 512), false);
91 91
92 // WEBP
93 check(r, "baby_tux.webp", SkISize::Make(386, 395), false);
94 check(r, "color_wheel.webp", SkISize::Make(128, 128), false);
95 check(r, "yellow_rose.webp", SkISize::Make(400, 301), false);
96
92 // BMP 97 // BMP
93 check(r, "randPixels.bmp", SkISize::Make(8, 8), false); 98 check(r, "randPixels.bmp", SkISize::Make(8, 8), false);
94 99
95 // ICO 100 // ICO
96 // These two tests examine interestingly different behavior: 101 // These two tests examine interestingly different behavior:
97 // Decodes an embedded BMP image 102 // Decodes an embedded BMP image
98 check(r, "color_wheel.ico", SkISize::Make(128, 128), false); 103 check(r, "color_wheel.ico", SkISize::Make(128, 128), false);
99 // Decodes an embedded PNG image 104 // Decodes an embedded PNG image
100 check(r, "google_chrome.ico", SkISize::Make(256, 256), false); 105 check(r, "google_chrome.ico", SkISize::Make(256, 256), false);
101 106
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 test_empty(r, "empty_images/zero-embedded.ico"); 217 test_empty(r, "empty_images/zero-embedded.ico");
213 test_empty(r, "empty_images/zero-width.bmp"); 218 test_empty(r, "empty_images/zero-width.bmp");
214 test_empty(r, "empty_images/zero-height.bmp"); 219 test_empty(r, "empty_images/zero-height.bmp");
215 test_empty(r, "empty_images/zero-width.jpg"); 220 test_empty(r, "empty_images/zero-width.jpg");
216 test_empty(r, "empty_images/zero-height.jpg"); 221 test_empty(r, "empty_images/zero-height.jpg");
217 test_empty(r, "empty_images/zero-width.png"); 222 test_empty(r, "empty_images/zero-width.png");
218 test_empty(r, "empty_images/zero-height.png"); 223 test_empty(r, "empty_images/zero-height.png");
219 test_empty(r, "empty_images/zero-width.wbmp"); 224 test_empty(r, "empty_images/zero-width.wbmp");
220 test_empty(r, "empty_images/zero-height.wbmp"); 225 test_empty(r, "empty_images/zero-height.wbmp");
221 } 226 }
OLDNEW
« no previous file with comments | « src/codec/SkWebpCodec.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698