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

Unified Diff: src/core/SkImageGenerator.cpp

Issue 1263013002: Remove SK_LEGACY_IMAGE_GENERATOR_ENUMS_AND_OPTIONS (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkImageGenerator.h ('k') | src/images/SkDecodingImageGenerator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkImageGenerator.cpp
diff --git a/src/core/SkImageGenerator.cpp b/src/core/SkImageGenerator.cpp
index 8c9ff6a03515a455b1130f4c76a6a92c7a7fed7b..82b42d7a97e9ab1106fcee9740ca0b955acbfd82 100644
--- a/src/core/SkImageGenerator.cpp
+++ b/src/core/SkImageGenerator.cpp
@@ -31,25 +31,11 @@ bool SkImageGenerator::getPixels(const SkImageInfo& info, void* pixels, size_t r
ctable = NULL;
}
-#ifdef SK_LEGACY_IMAGE_GENERATOR_ENUMS_AND_OPTIONS
- // Default options.
- Options options;
- const Result result = this->onGetPixels(info, pixels, rowBytes, options, ctable, ctableCount);
-
- if (kIncompleteInput != result && kSuccess != result) {
- return false;
- }
- if (ctableCount) {
- SkASSERT(*ctableCount >= 0 && *ctableCount <= 256);
- }
- return true;
-#else
const bool success = this->onGetPixels(info, pixels, rowBytes, ctable, ctableCount);
if (success && ctableCount) {
SkASSERT(*ctableCount >= 0 && *ctableCount <= 256);
}
return success;
-#endif
}
bool SkImageGenerator::getPixels(const SkImageInfo& info, void* pixels, size_t rowBytes) {
@@ -118,18 +104,10 @@ SkData* SkImageGenerator::onRefEncodedData() {
return NULL;
}
-#ifdef SK_LEGACY_IMAGE_GENERATOR_ENUMS_AND_OPTIONS
-SkImageGenerator::Result SkImageGenerator::onGetPixels(const SkImageInfo& info, void* dst,
- size_t rb, const Options& options,
- SkPMColor* colors, int* colorCount) {
- return kUnimplemented;
-}
-#else
bool SkImageGenerator::onGetPixels(const SkImageInfo& info, void* dst, size_t rb,
SkPMColor* colors, int* colorCount) {
return false;
}
-#endif
///////////////////////////////////////////////////////////////////////////////////////////////////
« 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