| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 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 "SkColor.h" | 8 #include "SkColor.h" |
| 9 #include "SkColorPriv.h" | 9 #include "SkColorPriv.h" |
| 10 #include "SkColorTable.h" | 10 #include "SkColorTable.h" |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 #endif | 470 #endif |
| 471 return error_return(*bm, "DGifGetExtension"); | 471 return error_return(*bm, "DGifGetExtension"); |
| 472 } | 472 } |
| 473 | 473 |
| 474 while (extData != NULL) { | 474 while (extData != NULL) { |
| 475 /* Create an extension block with our data */ | 475 /* Create an extension block with our data */ |
| 476 #if GIFLIB_MAJOR < 5 | 476 #if GIFLIB_MAJOR < 5 |
| 477 if (AddExtensionBlock(&temp_save, extData[0], | 477 if (AddExtensionBlock(&temp_save, extData[0], |
| 478 &extData[1]) == GIF_ERROR) { | 478 &extData[1]) == GIF_ERROR) { |
| 479 #else | 479 #else |
| 480 if (GifAddExtensionBlock(&gif->ExtensionBlockCount, | 480 if (GifAddExtensionBlock(&temp_save.ExtensionBlockCount, |
| 481 &gif->ExtensionBlocks, | 481 &temp_save.ExtensionBlocks, |
| 482 extFunction, | 482 extFunction, |
| 483 extData[0], | 483 extData[0], |
| 484 &extData[1]) == GIF_ERROR) { | 484 &extData[1]) == GIF_ERROR) { |
| 485 #endif | 485 #endif |
| 486 return error_return(*bm, "AddExtensionBlock"); | 486 return error_return(*bm, "AddExtensionBlock"); |
| 487 } | 487 } |
| 488 if (DGifGetExtensionNext(gif, &extData) == GIF_ERROR) { | 488 if (DGifGetExtensionNext(gif, &extData) == GIF_ERROR) { |
| 489 return error_return(*bm, "DGifGetExtensionNext"); | 489 return error_return(*bm, "DGifGetExtensionNext"); |
| 490 } | 490 } |
| 491 #if GIFLIB_MAJOR < 5 | 491 #if GIFLIB_MAJOR < 5 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 static SkImageDecoder_DecodeReg gReg(sk_libgif_dfactory); | 532 static SkImageDecoder_DecodeReg gReg(sk_libgif_dfactory); |
| 533 | 533 |
| 534 static SkImageDecoder::Format get_format_gif(SkStreamRewindable* stream) { | 534 static SkImageDecoder::Format get_format_gif(SkStreamRewindable* stream) { |
| 535 if (is_gif(stream)) { | 535 if (is_gif(stream)) { |
| 536 return SkImageDecoder::kGIF_Format; | 536 return SkImageDecoder::kGIF_Format; |
| 537 } | 537 } |
| 538 return SkImageDecoder::kUnknown_Format; | 538 return SkImageDecoder::kUnknown_Format; |
| 539 } | 539 } |
| 540 | 540 |
| 541 static SkImageDecoder_FormatReg gFormatReg(get_format_gif); | 541 static SkImageDecoder_FormatReg gFormatReg(get_format_gif); |
| OLD | NEW |