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

Side by Side Diff: src/core/SkImageGenerator.cpp

Issue 939113002: Rename onGetPixelsEnum back to onGetPixels. (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 | « include/core/SkImageGenerator.h ('k') | src/images/SkDecodingImageGenerator.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 "SkImageGenerator.h" 8 #include "SkImageGenerator.h"
9 9
10 bool SkImageGenerator::getInfo(SkImageInfo* info) { 10 bool SkImageGenerator::getInfo(SkImageInfo* info) {
(...skipping 22 matching lines...) Expand all
33 return kInvalidParameters; 33 return kInvalidParameters;
34 } 34 }
35 } else { 35 } else {
36 if (ctableCount) { 36 if (ctableCount) {
37 *ctableCount = 0; 37 *ctableCount = 0;
38 } 38 }
39 ctableCount = NULL; 39 ctableCount = NULL;
40 ctable = NULL; 40 ctable = NULL;
41 } 41 }
42 42
43 const Result result = this->onGetPixelsEnum(info, pixels, rowBytes, ctable, ctableCount); 43 const Result result = this->onGetPixels(info, pixels, rowBytes, ctable, ctab leCount);
44 44
45 if ((kIncompleteInput == result || kSuccess == result) && ctableCount) { 45 if ((kIncompleteInput == result || kSuccess == result) && ctableCount) {
46 SkASSERT(*ctableCount >= 0 && *ctableCount <= 256); 46 SkASSERT(*ctableCount >= 0 && *ctableCount <= 256);
47 } 47 }
48 return result; 48 return result;
49 } 49 }
50 50
51 SkImageGenerator::Result SkImageGenerator::getPixels(const SkImageInfo& info, vo id* pixels, 51 SkImageGenerator::Result SkImageGenerator::getPixels(const SkImageInfo& info, vo id* pixels,
52 size_t rowBytes) { 52 size_t rowBytes) {
53 SkASSERT(kIndex_8_SkColorType != info.colorType()); 53 SkASSERT(kIndex_8_SkColorType != info.colorType());
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 //////////////////////////////////////////////////////////////////////////////// ///////////// 112 //////////////////////////////////////////////////////////////////////////////// /////////////
113 113
114 SkData* SkImageGenerator::onRefEncodedData() { 114 SkData* SkImageGenerator::onRefEncodedData() {
115 return NULL; 115 return NULL;
116 } 116 }
117 117
118 bool SkImageGenerator::onGetInfo(SkImageInfo*) { 118 bool SkImageGenerator::onGetInfo(SkImageInfo*) {
119 return false; 119 return false;
120 } 120 }
121 121
122 #ifdef SK_SUPPORT_LEGACY_IMAGE_GENERATOR_RETURN 122 SkImageGenerator::Result SkImageGenerator::onGetPixels(const SkImageInfo&, void* , size_t,
123 bool SkImageGenerator::onGetPixels(const SkImageInfo&, void*, size_t,
124 SkPMColor*, int*) { 123 SkPMColor*, int*) {
125 return false;
126 }
127 #endif
128 SkImageGenerator::Result SkImageGenerator::onGetPixelsEnum(const SkImageInfo& in fo, void* pixels,
129 size_t rowBytes, SkPM Color* colors,
130 int* colorCount) {
131 #ifdef SK_SUPPORT_LEGACY_IMAGE_GENERATOR_RETURN
132 if (this->onGetPixels(info, pixels, rowBytes, colors, colorCount)) {
133 return kSuccess;
134 }
135 #endif
136 return kUnimplemented; 124 return kUnimplemented;
137 } 125 }
OLDNEW
« no previous file with comments | « include/core/SkImageGenerator.h ('k') | src/images/SkDecodingImageGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698