aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/SkBitmapRegionCanvas.cpp13
-rw-r--r--tools/SkBitmapRegionDecoderInterface.cpp8
-rw-r--r--tools/dm_flags.json760
-rwxr-xr-xtools/dm_flags.py21
4 files changed, 787 insertions, 15 deletions
diff --git a/tools/SkBitmapRegionCanvas.cpp b/tools/SkBitmapRegionCanvas.cpp
index c54d936edc..086ac19864 100644
--- a/tools/SkBitmapRegionCanvas.cpp
+++ b/tools/SkBitmapRegionCanvas.cpp
@@ -128,22 +128,13 @@ SkBitmap* SkBitmapRegionCanvas::decodeRegion(int inputX, int inputY,
}
// Skip the unneeded rows
- if (SkCodec::kSuccess != fDecoder->skipScanlines(imageSubsetY)) {
+ if (!fDecoder->skipScanlines(imageSubsetY)) {
SkDebugf("Error: Failed to skip scanlines.\n");
return nullptr;
}
// Decode the necessary rows
- SkCodec::Result result = fDecoder->getScanlines(tmp.getAddr(0, 0), imageSubsetHeight,
- tmp.rowBytes());
- switch (result) {
- case SkCodec::kSuccess:
- case SkCodec::kIncompleteInput:
- break;
- default:
- SkDebugf("Error: Failed to get scanlines.\n");
- return nullptr;
- }
+ fDecoder->getScanlines(tmp.getAddr(0, 0), imageSubsetHeight, tmp.rowBytes());
// Calculate the size of the output
const int outWidth = get_scaled_dimension(inputWidth, sampleSize);
diff --git a/tools/SkBitmapRegionDecoderInterface.cpp b/tools/SkBitmapRegionDecoderInterface.cpp
index 5c769d676e..47de31f4ec 100644
--- a/tools/SkBitmapRegionDecoderInterface.cpp
+++ b/tools/SkBitmapRegionDecoderInterface.cpp
@@ -29,12 +29,12 @@ SkBitmapRegionDecoderInterface* SkBitmapRegionDecoderInterface::CreateBitmapRegi
return new SkBitmapRegionSampler(decoder, width, height);
}
case kCanvas_Strategy: {
- SkCodec* decoder = SkCodec::NewFromStream(stream);
- if (nullptr == decoder) {
+ SkAutoTDelete<SkCodec> codec(SkCodec::NewFromStream(stream));
+ if (nullptr == codec) {
SkDebugf("Error: Failed to create decoder.\n");
return nullptr;
}
- switch (decoder->getScanlineOrder()) {
+ switch (codec->getScanlineOrder()) {
case SkCodec::kTopDown_SkScanlineOrder:
case SkCodec::kNone_SkScanlineOrder:
break;
@@ -42,7 +42,7 @@ SkBitmapRegionDecoderInterface* SkBitmapRegionDecoderInterface::CreateBitmapRegi
SkDebugf("Error: Scanline ordering not supported.\n");
return nullptr;
}
- return new SkBitmapRegionCanvas(decoder);
+ return new SkBitmapRegionCanvas(codec.detach());
}
default:
SkASSERT(false);
diff --git a/tools/dm_flags.json b/tools/dm_flags.json
index 5dc0b5295e..11baa6d469 100644
--- a/tools/dm_flags.json
+++ b/tools/dm_flags.json
@@ -125,6 +125,82 @@
"image",
"decode",
"Hopstarter-Mac-Folders-Apple.ico",
+ "_",
+ "image",
+ "decode",
+ "inc0.gif",
+ "_",
+ "image",
+ "decode",
+ "inc1.gif",
+ "_",
+ "image",
+ "decode",
+ "incInterlaced.gif",
+ "_",
+ "image",
+ "decode",
+ "inc0.jpg",
+ "_",
+ "image",
+ "decode",
+ "incGray.jpg",
+ "_",
+ "image",
+ "decode",
+ "inc0.wbmp",
+ "_",
+ "image",
+ "decode",
+ "inc1.wbmp",
+ "_",
+ "image",
+ "decode",
+ "inc0.webp",
+ "_",
+ "image",
+ "decode",
+ "inc1.webp",
+ "_",
+ "image",
+ "decode",
+ "inc0.ico",
+ "_",
+ "image",
+ "decode",
+ "inc1.ico",
+ "_",
+ "image",
+ "decode",
+ "inc0.png",
+ "_",
+ "image",
+ "decode",
+ "inc1.png",
+ "_",
+ "image",
+ "decode",
+ "inc2.png",
+ "_",
+ "image",
+ "decode",
+ "inc12.png",
+ "_",
+ "image",
+ "decode",
+ "inc13.png",
+ "_",
+ "image",
+ "decode",
+ "inc14.png",
+ "_",
+ "image",
+ "subset",
+ "inc0.webp",
+ "_",
+ "image",
+ "subset",
+ "inc1.webp",
"gpu",
"skp",
"_",
@@ -275,6 +351,82 @@
"image",
"decode",
"Hopstarter-Mac-Folders-Apple.ico",
+ "_",
+ "image",
+ "decode",
+ "inc0.gif",
+ "_",
+ "image",
+ "decode",
+ "inc1.gif",
+ "_",
+ "image",
+ "decode",
+ "incInterlaced.gif",
+ "_",
+ "image",
+ "decode",
+ "inc0.jpg",
+ "_",
+ "image",
+ "decode",
+ "incGray.jpg",
+ "_",
+ "image",
+ "decode",
+ "inc0.wbmp",
+ "_",
+ "image",
+ "decode",
+ "inc1.wbmp",
+ "_",
+ "image",
+ "decode",
+ "inc0.webp",
+ "_",
+ "image",
+ "decode",
+ "inc1.webp",
+ "_",
+ "image",
+ "decode",
+ "inc0.ico",
+ "_",
+ "image",
+ "decode",
+ "inc1.ico",
+ "_",
+ "image",
+ "decode",
+ "inc0.png",
+ "_",
+ "image",
+ "decode",
+ "inc1.png",
+ "_",
+ "image",
+ "decode",
+ "inc2.png",
+ "_",
+ "image",
+ "decode",
+ "inc12.png",
+ "_",
+ "image",
+ "decode",
+ "inc13.png",
+ "_",
+ "image",
+ "decode",
+ "inc14.png",
+ "_",
+ "image",
+ "subset",
+ "inc0.webp",
+ "_",
+ "image",
+ "subset",
+ "inc1.webp",
"--match",
"~WritePixels",
"~tabl_mozilla_0",
@@ -398,6 +550,82 @@
"image",
"decode",
"Hopstarter-Mac-Folders-Apple.ico",
+ "_",
+ "image",
+ "decode",
+ "inc0.gif",
+ "_",
+ "image",
+ "decode",
+ "inc1.gif",
+ "_",
+ "image",
+ "decode",
+ "incInterlaced.gif",
+ "_",
+ "image",
+ "decode",
+ "inc0.jpg",
+ "_",
+ "image",
+ "decode",
+ "incGray.jpg",
+ "_",
+ "image",
+ "decode",
+ "inc0.wbmp",
+ "_",
+ "image",
+ "decode",
+ "inc1.wbmp",
+ "_",
+ "image",
+ "decode",
+ "inc0.webp",
+ "_",
+ "image",
+ "decode",
+ "inc1.webp",
+ "_",
+ "image",
+ "decode",
+ "inc0.ico",
+ "_",
+ "image",
+ "decode",
+ "inc1.ico",
+ "_",
+ "image",
+ "decode",
+ "inc0.png",
+ "_",
+ "image",
+ "decode",
+ "inc1.png",
+ "_",
+ "image",
+ "decode",
+ "inc2.png",
+ "_",
+ "image",
+ "decode",
+ "inc12.png",
+ "_",
+ "image",
+ "decode",
+ "inc13.png",
+ "_",
+ "image",
+ "decode",
+ "inc14.png",
+ "_",
+ "image",
+ "subset",
+ "inc0.webp",
+ "_",
+ "image",
+ "subset",
+ "inc1.webp",
"--match",
"~tabl_mozilla_0",
"~desk_yahoonews_0",
@@ -523,6 +751,82 @@
"image",
"decode",
"Hopstarter-Mac-Folders-Apple.ico",
+ "_",
+ "image",
+ "decode",
+ "inc0.gif",
+ "_",
+ "image",
+ "decode",
+ "inc1.gif",
+ "_",
+ "image",
+ "decode",
+ "incInterlaced.gif",
+ "_",
+ "image",
+ "decode",
+ "inc0.jpg",
+ "_",
+ "image",
+ "decode",
+ "incGray.jpg",
+ "_",
+ "image",
+ "decode",
+ "inc0.wbmp",
+ "_",
+ "image",
+ "decode",
+ "inc1.wbmp",
+ "_",
+ "image",
+ "decode",
+ "inc0.webp",
+ "_",
+ "image",
+ "decode",
+ "inc1.webp",
+ "_",
+ "image",
+ "decode",
+ "inc0.ico",
+ "_",
+ "image",
+ "decode",
+ "inc1.ico",
+ "_",
+ "image",
+ "decode",
+ "inc0.png",
+ "_",
+ "image",
+ "decode",
+ "inc1.png",
+ "_",
+ "image",
+ "decode",
+ "inc2.png",
+ "_",
+ "image",
+ "decode",
+ "inc12.png",
+ "_",
+ "image",
+ "decode",
+ "inc13.png",
+ "_",
+ "image",
+ "decode",
+ "inc14.png",
+ "_",
+ "image",
+ "subset",
+ "inc0.webp",
+ "_",
+ "image",
+ "subset",
+ "inc1.webp",
"--match",
"~tabl_mozilla_0",
"~desk_yahoonews_0"
@@ -645,6 +949,82 @@
"image",
"decode",
"Hopstarter-Mac-Folders-Apple.ico",
+ "_",
+ "image",
+ "decode",
+ "inc0.gif",
+ "_",
+ "image",
+ "decode",
+ "inc1.gif",
+ "_",
+ "image",
+ "decode",
+ "incInterlaced.gif",
+ "_",
+ "image",
+ "decode",
+ "inc0.jpg",
+ "_",
+ "image",
+ "decode",
+ "incGray.jpg",
+ "_",
+ "image",
+ "decode",
+ "inc0.wbmp",
+ "_",
+ "image",
+ "decode",
+ "inc1.wbmp",
+ "_",
+ "image",
+ "decode",
+ "inc0.webp",
+ "_",
+ "image",
+ "decode",
+ "inc1.webp",
+ "_",
+ "image",
+ "decode",
+ "inc0.ico",
+ "_",
+ "image",
+ "decode",
+ "inc1.ico",
+ "_",
+ "image",
+ "decode",
+ "inc0.png",
+ "_",
+ "image",
+ "decode",
+ "inc1.png",
+ "_",
+ "image",
+ "decode",
+ "inc2.png",
+ "_",
+ "image",
+ "decode",
+ "inc12.png",
+ "_",
+ "image",
+ "decode",
+ "inc13.png",
+ "_",
+ "image",
+ "decode",
+ "inc14.png",
+ "_",
+ "image",
+ "subset",
+ "inc0.webp",
+ "_",
+ "image",
+ "subset",
+ "inc1.webp",
"--match",
"~tabl_mozilla_0",
"~desk_yahoonews_0"
@@ -765,6 +1145,82 @@
"Hopstarter-Mac-Folders-Apple.ico",
"_",
"image",
+ "decode",
+ "inc0.gif",
+ "_",
+ "image",
+ "decode",
+ "inc1.gif",
+ "_",
+ "image",
+ "decode",
+ "incInterlaced.gif",
+ "_",
+ "image",
+ "decode",
+ "inc0.jpg",
+ "_",
+ "image",
+ "decode",
+ "incGray.jpg",
+ "_",
+ "image",
+ "decode",
+ "inc0.wbmp",
+ "_",
+ "image",
+ "decode",
+ "inc1.wbmp",
+ "_",
+ "image",
+ "decode",
+ "inc0.webp",
+ "_",
+ "image",
+ "decode",
+ "inc1.webp",
+ "_",
+ "image",
+ "decode",
+ "inc0.ico",
+ "_",
+ "image",
+ "decode",
+ "inc1.ico",
+ "_",
+ "image",
+ "decode",
+ "inc0.png",
+ "_",
+ "image",
+ "decode",
+ "inc1.png",
+ "_",
+ "image",
+ "decode",
+ "inc2.png",
+ "_",
+ "image",
+ "decode",
+ "inc12.png",
+ "_",
+ "image",
+ "decode",
+ "inc13.png",
+ "_",
+ "image",
+ "decode",
+ "inc14.png",
+ "_",
+ "image",
+ "subset",
+ "inc0.webp",
+ "_",
+ "image",
+ "subset",
+ "inc1.webp",
+ "_",
+ "image",
"_",
"interlaced1.png",
"_",
@@ -910,6 +1366,82 @@
"Hopstarter-Mac-Folders-Apple.ico",
"_",
"image",
+ "decode",
+ "inc0.gif",
+ "_",
+ "image",
+ "decode",
+ "inc1.gif",
+ "_",
+ "image",
+ "decode",
+ "incInterlaced.gif",
+ "_",
+ "image",
+ "decode",
+ "inc0.jpg",
+ "_",
+ "image",
+ "decode",
+ "incGray.jpg",
+ "_",
+ "image",
+ "decode",
+ "inc0.wbmp",
+ "_",
+ "image",
+ "decode",
+ "inc1.wbmp",
+ "_",
+ "image",
+ "decode",
+ "inc0.webp",
+ "_",
+ "image",
+ "decode",
+ "inc1.webp",
+ "_",
+ "image",
+ "decode",
+ "inc0.ico",
+ "_",
+ "image",
+ "decode",
+ "inc1.ico",
+ "_",
+ "image",
+ "decode",
+ "inc0.png",
+ "_",
+ "image",
+ "decode",
+ "inc1.png",
+ "_",
+ "image",
+ "decode",
+ "inc2.png",
+ "_",
+ "image",
+ "decode",
+ "inc12.png",
+ "_",
+ "image",
+ "decode",
+ "inc13.png",
+ "_",
+ "image",
+ "decode",
+ "inc14.png",
+ "_",
+ "image",
+ "subset",
+ "inc0.webp",
+ "_",
+ "image",
+ "subset",
+ "inc1.webp",
+ "_",
+ "image",
"_",
"interlaced1.png",
"_",
@@ -1051,6 +1583,82 @@
"image",
"decode",
"Hopstarter-Mac-Folders-Apple.ico",
+ "_",
+ "image",
+ "decode",
+ "inc0.gif",
+ "_",
+ "image",
+ "decode",
+ "inc1.gif",
+ "_",
+ "image",
+ "decode",
+ "incInterlaced.gif",
+ "_",
+ "image",
+ "decode",
+ "inc0.jpg",
+ "_",
+ "image",
+ "decode",
+ "incGray.jpg",
+ "_",
+ "image",
+ "decode",
+ "inc0.wbmp",
+ "_",
+ "image",
+ "decode",
+ "inc1.wbmp",
+ "_",
+ "image",
+ "decode",
+ "inc0.webp",
+ "_",
+ "image",
+ "decode",
+ "inc1.webp",
+ "_",
+ "image",
+ "decode",
+ "inc0.ico",
+ "_",
+ "image",
+ "decode",
+ "inc1.ico",
+ "_",
+ "image",
+ "decode",
+ "inc0.png",
+ "_",
+ "image",
+ "decode",
+ "inc1.png",
+ "_",
+ "image",
+ "decode",
+ "inc2.png",
+ "_",
+ "image",
+ "decode",
+ "inc12.png",
+ "_",
+ "image",
+ "decode",
+ "inc13.png",
+ "_",
+ "image",
+ "decode",
+ "inc14.png",
+ "_",
+ "image",
+ "subset",
+ "inc0.webp",
+ "_",
+ "image",
+ "subset",
+ "inc1.webp",
"pdf",
"_",
"_",
@@ -1217,6 +1825,82 @@
"image",
"decode",
"Hopstarter-Mac-Folders-Apple.ico",
+ "_",
+ "image",
+ "decode",
+ "inc0.gif",
+ "_",
+ "image",
+ "decode",
+ "inc1.gif",
+ "_",
+ "image",
+ "decode",
+ "incInterlaced.gif",
+ "_",
+ "image",
+ "decode",
+ "inc0.jpg",
+ "_",
+ "image",
+ "decode",
+ "incGray.jpg",
+ "_",
+ "image",
+ "decode",
+ "inc0.wbmp",
+ "_",
+ "image",
+ "decode",
+ "inc1.wbmp",
+ "_",
+ "image",
+ "decode",
+ "inc0.webp",
+ "_",
+ "image",
+ "decode",
+ "inc1.webp",
+ "_",
+ "image",
+ "decode",
+ "inc0.ico",
+ "_",
+ "image",
+ "decode",
+ "inc1.ico",
+ "_",
+ "image",
+ "decode",
+ "inc0.png",
+ "_",
+ "image",
+ "decode",
+ "inc1.png",
+ "_",
+ "image",
+ "decode",
+ "inc2.png",
+ "_",
+ "image",
+ "decode",
+ "inc12.png",
+ "_",
+ "image",
+ "decode",
+ "inc13.png",
+ "_",
+ "image",
+ "decode",
+ "inc14.png",
+ "_",
+ "image",
+ "subset",
+ "inc0.webp",
+ "_",
+ "image",
+ "subset",
+ "inc1.webp",
"pdf",
"_",
"_",
@@ -1386,6 +2070,82 @@
"_",
"image",
"decode",
+ "inc0.gif",
+ "_",
+ "image",
+ "decode",
+ "inc1.gif",
+ "_",
+ "image",
+ "decode",
+ "incInterlaced.gif",
+ "_",
+ "image",
+ "decode",
+ "inc0.jpg",
+ "_",
+ "image",
+ "decode",
+ "incGray.jpg",
+ "_",
+ "image",
+ "decode",
+ "inc0.wbmp",
+ "_",
+ "image",
+ "decode",
+ "inc1.wbmp",
+ "_",
+ "image",
+ "decode",
+ "inc0.webp",
+ "_",
+ "image",
+ "decode",
+ "inc1.webp",
+ "_",
+ "image",
+ "decode",
+ "inc0.ico",
+ "_",
+ "image",
+ "decode",
+ "inc1.ico",
+ "_",
+ "image",
+ "decode",
+ "inc0.png",
+ "_",
+ "image",
+ "decode",
+ "inc1.png",
+ "_",
+ "image",
+ "decode",
+ "inc2.png",
+ "_",
+ "image",
+ "decode",
+ "inc12.png",
+ "_",
+ "image",
+ "decode",
+ "inc13.png",
+ "_",
+ "image",
+ "decode",
+ "inc14.png",
+ "_",
+ "image",
+ "subset",
+ "inc0.webp",
+ "_",
+ "image",
+ "subset",
+ "inc1.webp",
+ "_",
+ "image",
+ "decode",
"_",
"_",
"image",
diff --git a/tools/dm_flags.py b/tools/dm_flags.py
index 64b4cec93e..e8f39182fd 100755
--- a/tools/dm_flags.py
+++ b/tools/dm_flags.py
@@ -112,6 +112,27 @@ def get_args(bot):
# New ico files that fail on SkImageDecoder
blacklist.extend('_ image decode Hopstarter-Mac-Folders-Apple.ico'.split(' '))
+ # Incomplete image tests that fail on SkImageDecoder
+ blacklist.extend('_ image decode inc0.gif'.split(' '))
+ blacklist.extend('_ image decode inc1.gif'.split(' '))
+ blacklist.extend('_ image decode incInterlaced.gif'.split(' '))
+ blacklist.extend('_ image decode inc0.jpg'.split(' '))
+ blacklist.extend('_ image decode incGray.jpg'.split(' '))
+ blacklist.extend('_ image decode inc0.wbmp'.split(' '))
+ blacklist.extend('_ image decode inc1.wbmp'.split(' '))
+ blacklist.extend('_ image decode inc0.webp'.split(' '))
+ blacklist.extend('_ image decode inc1.webp'.split(' '))
+ blacklist.extend('_ image decode inc0.ico'.split(' '))
+ blacklist.extend('_ image decode inc1.ico'.split(' '))
+ blacklist.extend('_ image decode inc0.png'.split(' '))
+ blacklist.extend('_ image decode inc1.png'.split(' '))
+ blacklist.extend('_ image decode inc2.png'.split(' '))
+ blacklist.extend('_ image decode inc12.png'.split(' '))
+ blacklist.extend('_ image decode inc13.png'.split(' '))
+ blacklist.extend('_ image decode inc14.png'.split(' '))
+ blacklist.extend('_ image subset inc0.webp'.split(' '))
+ blacklist.extend('_ image subset inc1.webp'.split(' '))
+
# Leon doesn't care about this, so why run it?
if 'Win' in bot:
blacklist.extend('_ image decode _'.split(' '))