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

Unified Diff: src/codec/SkCodecPriv.h

Issue 1320273004: Revert of Scanline decoding for gifs (Closed) Base URL: https://skia.googlesource.com/skia.git@real-bmp-scan
Patch Set: Created 5 years, 3 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 | « dm/DMSrcSink.cpp ('k') | src/codec/SkCodec_libgif.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkCodecPriv.h
diff --git a/src/codec/SkCodecPriv.h b/src/codec/SkCodecPriv.h
index 2769cec1cd4025f15611d4c9e5d53e65cb2eb47b..726074195daf23d787c0187520baa9a4a97e1e86 100644
--- a/src/codec/SkCodecPriv.h
+++ b/src/codec/SkCodecPriv.h
@@ -29,17 +29,6 @@
#define COMPUTE_RESULT_ALPHA \
SkSwizzler::GetResult(zeroAlpha, maxAlpha);
-
-/*
- * returns a scaled dimension based on the original dimension and the sampleSize
- * NOTE: we round down here for scaled dimension to match the behavior of SkImageDecoder
- */
-static int get_scaled_dimension(int srcDimension, int sampleSize) {
- if (sampleSize > srcDimension) {
- return 1;
- }
- return srcDimension / sampleSize;
-}
/*
* Returns the first coordinate that we will keep during a scaled decode.
@@ -148,7 +137,7 @@
SkASSERT(nullptr != inputColorPtr);
SkASSERT(nullptr != inputColorCount);
SkASSERT(nullptr != colorTable);
- memcpy(inputColorPtr, colorTable->readColors(), *inputColorCount * sizeof(SkPMColor));
+ memcpy(inputColorPtr, colorTable->readColors(), *inputColorCount * 4);
}
}
« no previous file with comments | « dm/DMSrcSink.cpp ('k') | src/codec/SkCodec_libgif.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698