| 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" |
| 11 #include "SkImageDecoder.h" | 11 #include "SkImageDecoder.h" |
| 12 #include "SkRTConf.h" | 12 #include "SkRTConf.h" |
| 13 #include "SkScaledBitmapSampler.h" | 13 #include "SkScaledBitmapSampler.h" |
| 14 #include "SkStream.h" | 14 #include "SkStream.h" |
| 15 #include "SkTemplates.h" | 15 #include "SkTemplates.h" |
| 16 #include "SkUtils.h" | 16 #include "SkUtils.h" |
| 17 | 17 |
| 18 #include "gif_lib.h" | 18 #include "gif_lib.h" |
| 19 | 19 |
| 20 class SkGIFImageDecoder : public SkImageDecoder { | 20 class SkGIFImageDecoder : public SkImageDecoder { |
| 21 public: | 21 public: |
| 22 Format getFormat() const SK_OVERRIDE { | 22 Format getFormat() const override { |
| 23 return kGIF_Format; | 23 return kGIF_Format; |
| 24 } | 24 } |
| 25 | 25 |
| 26 protected: | 26 protected: |
| 27 Result onDecode(SkStream* stream, SkBitmap* bm, Mode mode) SK_OVERRIDE; | 27 Result onDecode(SkStream* stream, SkBitmap* bm, Mode mode) override; |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 typedef SkImageDecoder INHERITED; | 30 typedef SkImageDecoder INHERITED; |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 static const uint8_t gStartingIterlaceYValue[] = { | 33 static const uint8_t gStartingIterlaceYValue[] = { |
| 34 0, 4, 2, 1 | 34 0, 4, 2, 1 |
| 35 }; | 35 }; |
| 36 static const uint8_t gDeltaIterlaceYValue[] = { | 36 static const uint8_t gDeltaIterlaceYValue[] = { |
| 37 8, 8, 4, 2 | 37 8, 8, 4, 2 |
| (...skipping 494 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 |