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

Side by Side Diff: src/ports/SkImageGenerator_skia.cpp

Issue 894833002: Add missing SK_OVERRIDE (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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 | « gm/imagefilterscropped.cpp ('k') | src/utils/debugger/SkDebugCanvas.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 2015 The Android Open Source Project 2 * Copyright 2015 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 "SkData.h" 8 #include "SkData.h"
9 #include "SkImageDecoder.h" 9 #include "SkImageDecoder.h"
10 #include "SkImageGenerator.h" 10 #include "SkImageGenerator.h"
(...skipping 29 matching lines...) Expand all
40 public: 40 public:
41 SkImageDecoderGenerator(const SkImageInfo& info, SkImageDecoder* decoder, Sk Data* data) 41 SkImageDecoderGenerator(const SkImageInfo& info, SkImageDecoder* decoder, Sk Data* data)
42 : fInfo(info), fDecoder(decoder), fData(SkRef(data)) 42 : fInfo(info), fDecoder(decoder), fData(SkRef(data))
43 {} 43 {}
44 44
45 protected: 45 protected:
46 SkData* onRefEncodedData() SK_OVERRIDE { 46 SkData* onRefEncodedData() SK_OVERRIDE {
47 return SkRef(fData.get()); 47 return SkRef(fData.get());
48 } 48 }
49 49
50 virtual bool onGetInfo(SkImageInfo* info) { 50 virtual bool onGetInfo(SkImageInfo* info) SK_OVERRIDE {
51 *info = fInfo; 51 *info = fInfo;
52 return true; 52 return true;
53 } 53 }
54 54
55 virtual bool onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBy tes, 55 virtual bool onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBy tes,
56 SkPMColor ctableEntries[], int* ctableCount) { 56 SkPMColor ctableEntries[], int* ctableCount) SK_OVE RRIDE {
57 SkMemoryStream stream(fData->data(), fData->size(), false); 57 SkMemoryStream stream(fData->data(), fData->size(), false);
58 SkAutoTUnref<BareMemoryAllocator> allocator(SkNEW_ARGS(BareMemoryAllocat or, 58 SkAutoTUnref<BareMemoryAllocator> allocator(SkNEW_ARGS(BareMemoryAllocat or,
59 (info, pixels, ro wBytes))); 59 (info, pixels, ro wBytes)));
60 fDecoder->setAllocator(allocator); 60 fDecoder->setAllocator(allocator);
61 fDecoder->setRequireUnpremultipliedColors(kUnpremul_SkAlphaType == info. alphaType()); 61 fDecoder->setRequireUnpremultipliedColors(kUnpremul_SkAlphaType == info. alphaType());
62 62
63 SkBitmap bm; 63 SkBitmap bm;
64 SkImageDecoder::Result result = fDecoder->decode(&stream, &bm, info.colo rType(), 64 SkImageDecoder::Result result = fDecoder->decode(&stream, &bm, info.colo rType(),
65 SkImageDecoder::kDecode Pixels_Mode); 65 SkImageDecoder::kDecode Pixels_Mode);
66 switch (result) { 66 switch (result) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 SkBitmap bm; 108 SkBitmap bm;
109 stream.rewind(); 109 stream.rewind();
110 if (!decoder->decode(&stream, &bm, kUnknown_SkColorType, SkImageDecoder::kDe codeBounds_Mode)) { 110 if (!decoder->decode(&stream, &bm, kUnknown_SkColorType, SkImageDecoder::kDe codeBounds_Mode)) {
111 SkDELETE(decoder); 111 SkDELETE(decoder);
112 return NULL; 112 return NULL;
113 } 113 }
114 114
115 return SkNEW_ARGS(SkImageDecoderGenerator, (bm.info(), decoder, data)); 115 return SkNEW_ARGS(SkImageDecoderGenerator, (bm.info(), decoder, data));
116 } 116 }
OLDNEW
« no previous file with comments | « gm/imagefilterscropped.cpp ('k') | src/utils/debugger/SkDebugCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698