| 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 "SkColorPriv.h" | 8 #include "SkColorPriv.h" |
| 9 #include "SkImageDecoder.h" | 9 #include "SkImageDecoder.h" |
| 10 #include "SkStream.h" | 10 #include "SkStream.h" |
| 11 #include "SkStreamPriv.h" | 11 #include "SkStreamPriv.h" |
| 12 #include "SkTypes.h" | 12 #include "SkTypes.h" |
| 13 | 13 |
| 14 class SkICOImageDecoder : public SkImageDecoder { | 14 class SkICOImageDecoder : public SkImageDecoder { |
| 15 public: | 15 public: |
| 16 SkICOImageDecoder(); | 16 SkICOImageDecoder(); |
| 17 | 17 |
| 18 Format getFormat() const SK_OVERRIDE { | 18 Format getFormat() const override { |
| 19 return kICO_Format; | 19 return kICO_Format; |
| 20 } | 20 } |
| 21 | 21 |
| 22 protected: | 22 protected: |
| 23 Result onDecode(SkStream* stream, SkBitmap* bm, Mode) SK_OVERRIDE; | 23 Result onDecode(SkStream* stream, SkBitmap* bm, Mode) override; |
| 24 | 24 |
| 25 private: | 25 private: |
| 26 typedef SkImageDecoder INHERITED; | 26 typedef SkImageDecoder INHERITED; |
| 27 }; | 27 }; |
| 28 | 28 |
| 29 ////////////////////////////////////////////////////////////////////////////////
///////// | 29 ////////////////////////////////////////////////////////////////////////////////
///////// |
| 30 | 30 |
| 31 //read bytes starting from the begin-th index in the buffer | 31 //read bytes starting from the begin-th index in the buffer |
| 32 //read in Intel order, and return an integer | 32 //read in Intel order, and return an integer |
| 33 | 33 |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 static SkImageDecoder_DecodeReg gReg(sk_libico_dfactory); | 443 static SkImageDecoder_DecodeReg gReg(sk_libico_dfactory); |
| 444 | 444 |
| 445 static SkImageDecoder::Format get_format_ico(SkStreamRewindable* stream) { | 445 static SkImageDecoder::Format get_format_ico(SkStreamRewindable* stream) { |
| 446 if (is_ico(stream)) { | 446 if (is_ico(stream)) { |
| 447 return SkImageDecoder::kICO_Format; | 447 return SkImageDecoder::kICO_Format; |
| 448 } | 448 } |
| 449 return SkImageDecoder::kUnknown_Format; | 449 return SkImageDecoder::kUnknown_Format; |
| 450 } | 450 } |
| 451 | 451 |
| 452 static SkImageDecoder_FormatReg gFormatReg(get_format_ico); | 452 static SkImageDecoder_FormatReg gFormatReg(get_format_ico); |
| OLD | NEW |