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

Side by Side Diff: tests/GifTest.cpp

Issue 670453002: Remove image decoder and encoder autoregistration (Closed) Base URL: https://skia.googlesource.com/skia.git@separate-image-decoder-01-skpicture
Patch Set: Created 6 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 // This tests out GIF decoder (SkImageDecoder_libgif.cpp) 8 // This tests out GIF decoder (SkImageDecoder_libgif.cpp)
9 // It is not used on these platforms: 9 // It is not used on these platforms:
10 #if (!defined(SK_BUILD_FOR_WIN32)) && \ 10 #if (!defined(SK_BUILD_FOR_WIN32)) && \
11 (!defined(SK_BUILD_FOR_IOS)) && \ 11 (!defined(SK_BUILD_FOR_IOS)) && \
12 (!defined(SK_BUILD_FOR_MAC)) 12 (!defined(SK_BUILD_FOR_MAC))
13 13
14 #include "SkBitmap.h" 14 #include "SkBitmap.h"
15 #include "SkData.h" 15 #include "SkData.h"
16 #include "SkForceLinking.h"
17 #include "SkImage.h" 16 #include "SkImage.h"
18 #include "SkImageDecoder.h" 17 #include "SkImageDecoder.h"
19 #include "SkStream.h" 18 #include "SkStream.h"
20 #include "Test.h" 19 #include "Test.h"
21 20
22 __SK_FORCE_IMAGE_DECODER_LINKING;
23
24 static unsigned char gGIFData[] = { 21 static unsigned char gGIFData[] = {
25 0x47, 0x49, 0x46, 0x38, 0x37, 0x61, 0x03, 0x00, 0x03, 0x00, 0xe3, 0x08, 22 0x47, 0x49, 0x46, 0x38, 0x37, 0x61, 0x03, 0x00, 0x03, 0x00, 0xe3, 0x08,
26 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0x00, 23 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0x00,
27 0xff, 0x80, 0x80, 0x80, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 24 0xff, 0x80, 0x80, 0x80, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
28 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 25 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
29 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 26 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
30 0xff, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x04, 27 0xff, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x04,
31 0x07, 0x50, 0x1c, 0x43, 0x40, 0x41, 0x23, 0x44, 0x00, 0x3b 28 0x07, 0x50, 0x1c, 0x43, 0x40, 0x41, 0x23, 0x44, 0x00, 0x3b
32 }; 29 };
33 30
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 // test short Gif. 80 is missing a few bytes. 188 // test short Gif. 80 is missing a few bytes.
192 test_gif_data_short(reporter, static_cast<void *>(gGIFData), 80); 189 test_gif_data_short(reporter, static_cast<void *>(gGIFData), 80);
193 // "libgif warning [DGifGetLine]" 190 // "libgif warning [DGifGetLine]"
194 191
195 test_interlaced_gif_data(reporter, static_cast<void *>(gInterlacedGIF), 192 test_interlaced_gif_data(reporter, static_cast<void *>(gInterlacedGIF),
196 100); // 100 is missing a few bytes 193 100); // 100 is missing a few bytes
197 // "libgif warning [interlace DGifGetLine]" 194 // "libgif warning [interlace DGifGetLine]"
198 } 195 }
199 196
200 #endif // !(SK_BUILD_FOR_WIN32||SK_BUILD_FOR_IOS||SK_BUILD_FOR_MAC) 197 #endif // !(SK_BUILD_FOR_WIN32||SK_BUILD_FOR_IOS||SK_BUILD_FOR_MAC)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698