OLD | NEW |
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 #ifdef SK_SUPPORT_LEGACY_IMAGE_GENERATOR_RETURN |
123 bool SkImageGenerator::onGetPixels(const SkImageInfo&, void*, size_t, | 123 bool SkImageGenerator::onGetPixels(const SkImageInfo&, void*, size_t, |
124 SkPMColor*, int*) { | 124 SkPMColor*, int*) { |
125 return kUnimplemented; | 125 return false; |
126 } | 126 } |
127 #endif | 127 #endif |
128 SkImageGenerator::Result SkImageGenerator::onGetPixelsEnum(const SkImageInfo& in
fo, void* pixels, | 128 SkImageGenerator::Result SkImageGenerator::onGetPixelsEnum(const SkImageInfo& in
fo, void* pixels, |
129 size_t rowBytes, SkPM
Color* colors, | 129 size_t rowBytes, SkPM
Color* colors, |
130 int* colorCount) { | 130 int* colorCount) { |
131 #ifdef SK_SUPPORT_LEGACY_IMAGE_GENERATOR_RETURN | 131 #ifdef SK_SUPPORT_LEGACY_IMAGE_GENERATOR_RETURN |
132 if (this->onGetPixels(info, pixels, rowBytes, colors, colorCount)) { | 132 if (this->onGetPixels(info, pixels, rowBytes, colors, colorCount)) { |
133 return kSuccess; | 133 return kSuccess; |
134 } | 134 } |
135 #endif | 135 #endif |
136 return kUnimplemented; | 136 return kUnimplemented; |
137 } | 137 } |
OLD | NEW |