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

Side by Side Diff: src/images/SkImageDecoder_wbmp.cpp

Issue 806653007: Fix up all the easy virtual ... SK_OVERRIDE cases. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 11 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/images/SkImageDecoder_pkm.cpp ('k') | src/images/SkImageEncoder_argb.cpp » ('j') | 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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkImageDecoder.h" 10 #include "SkImageDecoder.h"
11 #include "SkColor.h" 11 #include "SkColor.h"
12 #include "SkColorPriv.h" 12 #include "SkColorPriv.h"
13 #include "SkMath.h" 13 #include "SkMath.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 class SkWBMPImageDecoder : public SkImageDecoder { 18 class SkWBMPImageDecoder : public SkImageDecoder {
19 public: 19 public:
20 virtual Format getFormat() const SK_OVERRIDE { 20 Format getFormat() const SK_OVERRIDE {
21 return kWBMP_Format; 21 return kWBMP_Format;
22 } 22 }
23 23
24 protected: 24 protected:
25 virtual Result onDecode(SkStream* stream, SkBitmap* bm, Mode) SK_OVERRIDE; 25 Result onDecode(SkStream* stream, SkBitmap* bm, Mode) SK_OVERRIDE;
26 26
27 private: 27 private:
28 typedef SkImageDecoder INHERITED; 28 typedef SkImageDecoder INHERITED;
29 }; 29 };
30 30
31 static bool read_byte(SkStream* stream, uint8_t* data) 31 static bool read_byte(SkStream* stream, uint8_t* data)
32 { 32 {
33 return stream->read(data, 1) == 1; 33 return stream->read(data, 1) == 1;
34 } 34 }
35 35
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 static SkImageDecoder::Format get_format_wbmp(SkStreamRewindable* stream) { 164 static SkImageDecoder::Format get_format_wbmp(SkStreamRewindable* stream) {
165 wbmp_head head; 165 wbmp_head head;
166 if (head.init(stream)) { 166 if (head.init(stream)) {
167 return SkImageDecoder::kWBMP_Format; 167 return SkImageDecoder::kWBMP_Format;
168 } 168 }
169 return SkImageDecoder::kUnknown_Format; 169 return SkImageDecoder::kUnknown_Format;
170 } 170 }
171 171
172 static SkImageDecoder_DecodeReg gDReg(sk_wbmp_dfactory); 172 static SkImageDecoder_DecodeReg gDReg(sk_wbmp_dfactory);
173 static SkImageDecoder_FormatReg gFormatReg(get_format_wbmp); 173 static SkImageDecoder_FormatReg gFormatReg(get_format_wbmp);
OLDNEW
« no previous file with comments | « src/images/SkImageDecoder_pkm.cpp ('k') | src/images/SkImageEncoder_argb.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698