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

Unified Diff: tests/CachedDecodingPixelRefTest.cpp

Issue 1226023003: Remove SkImageGenerator pieces only for SkCodec. (Closed) Base URL: https://skia.googlesource.com/skia.git@severIG
Patch Set: Change the public interface without staging it. 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 | « src/ports/SkImageGenerator_skia.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/CachedDecodingPixelRefTest.cpp
diff --git a/tests/CachedDecodingPixelRefTest.cpp b/tests/CachedDecodingPixelRefTest.cpp
index 465b69b8564393db4f355fa22186c1c9a7be1aa7..a2032ba1de9f4df431b970ca2f9e5b435adb4734 100644
--- a/tests/CachedDecodingPixelRefTest.cpp
+++ b/tests/CachedDecodingPixelRefTest.cpp
@@ -182,16 +182,29 @@ protected:
kOpaque_SkAlphaType);
}
- virtual Result onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes,
- const Options&,
- SkPMColor ctable[], int* ctableCount) override {
+#ifdef SK_LEGACY_IMAGE_GENERATOR_ENUMS_AND_OPTIONS
+ Result onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes,
+ const Options&,
+ SkPMColor ctable[], int* ctableCount) override {
+#else
+ bool onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes,
+ SkPMColor ctable[], int* ctableCount) override {
+#endif
REPORTER_ASSERT(fReporter, pixels != NULL);
REPORTER_ASSERT(fReporter, rowBytes >= info.minRowBytes());
if (fType != kSucceedGetPixels_TestType) {
+#ifdef SK_LEGACY_IMAGE_GENERATOR_ENUMS_AND_OPTIONS
return kUnimplemented;
+#else
+ return false;
+#endif
}
if (info.colorType() != kN32_SkColorType) {
+#ifdef SK_LEGACY_IMAGE_GENERATOR_ENUMS_AND_OPTIONS
return kInvalidConversion;
+#else
+ return false;
+#endif
}
char* bytePtr = static_cast<char*>(pixels);
for (int y = 0; y < info.height(); ++y) {
@@ -199,7 +212,11 @@ protected:
TestImageGenerator::Color(), info.width());
bytePtr += rowBytes;
}
+#ifdef SK_LEGACY_IMAGE_GENERATOR_ENUMS_AND_OPTIONS
return kSuccess;
+#else
+ return true;
+#endif
}
private:
« no previous file with comments | « src/ports/SkImageGenerator_skia.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698