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

Unified Diff: src/codec/SkCodec_libpng.cpp

Issue 980903002: Option for SkCodec to treat dst as all zeroes. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update SkBmpCodec to use new ZeroInitialized API. Created 5 years, 9 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/codec/SkCodec_libpng.h ('k') | src/codec/SkSwizzler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkCodec_libpng.cpp
diff --git a/src/codec/SkCodec_libpng.cpp b/src/codec/SkCodec_libpng.cpp
index f42af38fea707787f0fc760dba74d5486acf0572..bf0647dd24aeca259738708644782c8ace2db3be 100644
--- a/src/codec/SkCodec_libpng.cpp
+++ b/src/codec/SkCodec_libpng.cpp
@@ -363,8 +363,8 @@ static bool conversion_possible(const SkImageInfo& A, const SkImageInfo& B) {
}
SkCodec::Result SkPngCodec::onGetPixels(const SkImageInfo& requestedInfo, void* dst,
- size_t rowBytes, SkPMColor ctable[],
- int* ctableCount) {
+ size_t rowBytes, const Options& options,
+ SkPMColor ctable[], int* ctableCount) {
if (!this->rewindIfNeeded()) {
return kCouldNotRewind;
}
@@ -430,9 +430,9 @@ SkCodec::Result SkPngCodec::onGetPixels(const SkImageInfo& requestedInfo, void*
sc = SkSwizzler::kRGBA;
}
const SkPMColor* colors = colorTable ? colorTable->readColors() : NULL;
- // TODO: Support skipZeroes.
swizzler.reset(SkSwizzler::CreateSwizzler(sc, colors, requestedInfo,
- dst, rowBytes, false));
+ dst, rowBytes,
+ options.fZeroInitialized));
if (!swizzler) {
// FIXME: CreateSwizzler could fail for another reason.
return kUnimplemented;
« no previous file with comments | « src/codec/SkCodec_libpng.h ('k') | src/codec/SkSwizzler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698