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

Unified Diff: src/codec/SkWebpCodec.cpp

Issue 1390213002: Add subsetting to SkScanlineDecoder (Closed) Base URL: https://skia.googlesource.com/skia.git@fill-refactor
Patch Set: Rebase to manage dependencies Created 5 years, 2 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
Index: src/codec/SkWebpCodec.cpp
diff --git a/src/codec/SkWebpCodec.cpp b/src/codec/SkWebpCodec.cpp
index a0fab0a153d67f0d32375ac7405d06314a7bb317..c5f37d21dae15bf808f969be2b0f1101384a4765 100644
--- a/src/codec/SkWebpCodec.cpp
+++ b/src/codec/SkWebpCodec.cpp
@@ -140,15 +140,6 @@ static WEBP_CSP_MODE webp_decode_mode(SkColorType ct, bool premultiply) {
static const size_t BUFFER_SIZE = 4096;
bool SkWebpCodec::onGetValidSubset(SkIRect* desiredSubset) const {
- if (!desiredSubset) {
- return false;
- }
-
- SkIRect bounds = SkIRect::MakeSize(this->getInfo().dimensions());
- if (!desiredSubset->intersect(bounds)) {
- return false;
- }
-
// As stated below, libwebp snaps to even left and top. Make sure top and left are even, so we
// decode this exact subset.
// Leave right and bottom unmodified, so we suggest a slightly larger subset than requested.
« src/codec/SkSwizzler.cpp ('K') | « src/codec/SkSwizzler.cpp ('k') | tools/SkCodecTools.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698