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

Side by Side Diff: src/images/SkImageDecoder_astc.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/SkDecodingImageGenerator.cpp ('k') | src/images/SkImageDecoder_ktx.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 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 #include "SkEndian.h" 8 #include "SkEndian.h"
9 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkImageDecoder.h" 10 #include "SkImageDecoder.h"
11 #include "SkScaledBitmapSampler.h" 11 #include "SkScaledBitmapSampler.h"
12 #include "SkStream.h" 12 #include "SkStream.h"
13 #include "SkStreamPriv.h" 13 #include "SkStreamPriv.h"
14 #include "SkTypes.h" 14 #include "SkTypes.h"
15 15
16 #include "SkTextureCompressor.h" 16 #include "SkTextureCompressor.h"
17 17
18 class SkASTCImageDecoder : public SkImageDecoder { 18 class SkASTCImageDecoder : public SkImageDecoder {
19 public: 19 public:
20 SkASTCImageDecoder() { } 20 SkASTCImageDecoder() { }
21 21
22 virtual Format getFormat() const SK_OVERRIDE { 22 Format getFormat() const SK_OVERRIDE {
23 return kASTC_Format; 23 return kASTC_Format;
24 } 24 }
25 25
26 protected: 26 protected:
27 virtual Result onDecode(SkStream* stream, SkBitmap* bm, Mode) SK_OVERRIDE; 27 Result onDecode(SkStream* stream, SkBitmap* bm, Mode) SK_OVERRIDE;
28 28
29 private: 29 private:
30 typedef SkImageDecoder INHERITED; 30 typedef SkImageDecoder INHERITED;
31 }; 31 };
32 32
33 //////////////////////////////////////////////////////////////////////////////// ///////// 33 //////////////////////////////////////////////////////////////////////////////// /////////
34 34
35 static const uint32_t kASTCMagicNumber = 0x5CA1AB13; 35 static const uint32_t kASTCMagicNumber = 0x5CA1AB13;
36 36
37 static inline int read_24bit(const uint8_t* buf) { 37 static inline int read_24bit(const uint8_t* buf) {
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 static SkImageDecoder_DecodeReg gReg(sk_libastc_dfactory); 194 static SkImageDecoder_DecodeReg gReg(sk_libastc_dfactory);
195 195
196 static SkImageDecoder::Format get_format_astc(SkStreamRewindable* stream) { 196 static SkImageDecoder::Format get_format_astc(SkStreamRewindable* stream) {
197 if (is_astc(stream)) { 197 if (is_astc(stream)) {
198 return SkImageDecoder::kASTC_Format; 198 return SkImageDecoder::kASTC_Format;
199 } 199 }
200 return SkImageDecoder::kUnknown_Format; 200 return SkImageDecoder::kUnknown_Format;
201 } 201 }
202 202
203 static SkImageDecoder_FormatReg gFormatReg(get_format_astc); 203 static SkImageDecoder_FormatReg gFormatReg(get_format_astc);
OLDNEW
« no previous file with comments | « src/images/SkDecodingImageGenerator.cpp ('k') | src/images/SkImageDecoder_ktx.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698