Revert "Reland "Respect canvas size and frame offset in webp decoder""
This reverts commit 604971e39a20392fd4c74a56bcdc187311cf86dc.
Reason for revert: Strange vk failures
Original change's description:
> Reland "Respect canvas size and frame offset in webp decoder"
>
> Original Change Reviewed At:
> https://skia-review.googlesource.com/c/7800
>
> CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN
>
> BUG=skia:6185
>
> Change-Id: I92baa9070e15ef3c62dd347c08c906c2715dda10
> Reviewed-on: https://skia-review.googlesource.com/8050
> Reviewed-by: Matt Sarett <msarett@google.com>
> Commit-Queue: Matt Sarett <msarett@google.com>
>
TBR=msarett@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:6185
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN
Change-Id: Ice93b62c55ea13fce83140567be16225ff0e2fdb
Reviewed-on: https://skia-review.googlesource.com/8123
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
diff --git a/infra/bots/assets/skimage/VERSION b/infra/bots/assets/skimage/VERSION
index 2edeafb..dec2bf5 100644
--- a/infra/bots/assets/skimage/VERSION
+++ b/infra/bots/assets/skimage/VERSION
@@ -1 +1 @@
-20
\ No newline at end of file
+19
\ No newline at end of file
diff --git a/infra/bots/tasks.json b/infra/bots/tasks.json
index 09e6d5a..4d2d85b 100644
--- a/infra/bots/tasks.json
+++ b/infra/bots/tasks.json
@@ -3682,7 +3682,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -3731,7 +3731,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -3780,7 +3780,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -3829,7 +3829,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -3878,7 +3878,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -3927,7 +3927,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -3976,7 +3976,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4025,7 +4025,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4074,7 +4074,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4123,7 +4123,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4172,7 +4172,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4221,7 +4221,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4270,7 +4270,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4319,7 +4319,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4368,7 +4368,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4417,7 +4417,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4466,7 +4466,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4515,7 +4515,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4564,7 +4564,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4613,7 +4613,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4662,7 +4662,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4711,7 +4711,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4760,7 +4760,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4809,7 +4809,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4858,7 +4858,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4907,7 +4907,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4956,7 +4956,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5005,7 +5005,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5054,7 +5054,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5103,7 +5103,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5152,7 +5152,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5279,7 +5279,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5327,7 +5327,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5375,7 +5375,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5424,7 +5424,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5473,7 +5473,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5521,7 +5521,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5569,7 +5569,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5617,7 +5617,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5666,7 +5666,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5720,7 +5720,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5774,7 +5774,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5823,7 +5823,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5877,7 +5877,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5926,7 +5926,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5979,7 +5979,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6032,7 +6032,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6081,7 +6081,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6130,7 +6130,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6179,7 +6179,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6278,7 +6278,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6326,7 +6326,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6374,7 +6374,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6422,7 +6422,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6470,7 +6470,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6528,7 +6528,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6576,7 +6576,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6634,7 +6634,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6682,7 +6682,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6730,7 +6730,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6778,7 +6778,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6826,7 +6826,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6874,7 +6874,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6922,7 +6922,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6970,7 +6970,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7018,7 +7018,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7066,7 +7066,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7114,7 +7114,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7162,7 +7162,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7210,7 +7210,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7258,7 +7258,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7306,7 +7306,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7354,7 +7354,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7402,7 +7402,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7450,7 +7450,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7498,7 +7498,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7546,7 +7546,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7594,7 +7594,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7642,7 +7642,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7690,7 +7690,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7738,7 +7738,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7786,7 +7786,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7834,7 +7834,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7882,7 +7882,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7930,7 +7930,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7978,7 +7978,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8026,7 +8026,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8075,7 +8075,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8124,7 +8124,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8173,7 +8173,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8318,7 +8318,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8367,7 +8367,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8416,7 +8416,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8465,7 +8465,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8514,7 +8514,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8563,7 +8563,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8612,7 +8612,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8661,7 +8661,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8710,7 +8710,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8759,7 +8759,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8808,7 +8808,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8857,7 +8857,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8906,7 +8906,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8955,7 +8955,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9004,7 +9004,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9053,7 +9053,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9102,7 +9102,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9151,7 +9151,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9200,7 +9200,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9249,7 +9249,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9298,7 +9298,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9347,7 +9347,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9396,7 +9396,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9445,7 +9445,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9494,7 +9494,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9543,7 +9543,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9592,7 +9592,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9641,7 +9641,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9690,7 +9690,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9739,7 +9739,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9788,7 +9788,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9837,7 +9837,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9886,7 +9886,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9935,7 +9935,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9984,7 +9984,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10033,7 +10033,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10081,7 +10081,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10129,7 +10129,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10178,7 +10178,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10227,7 +10227,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10275,7 +10275,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10323,7 +10323,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10371,7 +10371,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10420,7 +10420,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10474,7 +10474,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10528,7 +10528,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10577,7 +10577,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10631,7 +10631,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10680,7 +10680,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10734,7 +10734,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10787,7 +10787,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10840,7 +10840,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10893,7 +10893,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10942,7 +10942,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11066,7 +11066,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11115,7 +11115,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11164,7 +11164,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11213,7 +11213,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11261,7 +11261,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11309,7 +11309,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11357,7 +11357,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11405,7 +11405,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11463,7 +11463,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11511,7 +11511,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11569,7 +11569,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11617,7 +11617,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11665,7 +11665,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11713,7 +11713,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11761,7 +11761,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11809,7 +11809,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11857,7 +11857,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11905,7 +11905,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11953,7 +11953,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12001,7 +12001,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12049,7 +12049,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12097,7 +12097,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12145,7 +12145,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12193,7 +12193,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12241,7 +12241,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12289,7 +12289,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12337,7 +12337,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12385,7 +12385,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12433,7 +12433,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12481,7 +12481,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12529,7 +12529,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12577,7 +12577,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12625,7 +12625,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12673,7 +12673,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12721,7 +12721,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12769,7 +12769,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12817,7 +12817,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12865,7 +12865,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12913,7 +12913,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12962,7 +12962,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -13011,7 +13011,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -13060,7 +13060,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -13109,7 +13109,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -13158,7 +13158,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -13207,7 +13207,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:20"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
diff --git a/resources/invalid_images/invalid-offset.webp b/resources/invalid_images/invalid-offset.webp
deleted file mode 100644
index 4a278d3..0000000
--- a/resources/invalid_images/invalid-offset.webp
+++ /dev/null
Binary files differ
diff --git a/src/codec/SkWebpCodec.cpp b/src/codec/SkWebpCodec.cpp
index 2bc3507..dbc141e 100644
--- a/src/codec/SkWebpCodec.cpp
+++ b/src/codec/SkWebpCodec.cpp
@@ -7,10 +7,9 @@
#include "SkCodecPriv.h"
#include "SkColorSpaceXform.h"
-#include "SkSampler.h"
+#include "SkWebpCodec.h"
#include "SkStreamPriv.h"
#include "SkTemplates.h"
-#include "SkWebpCodec.h"
// A WebP decoder on top of (subset of) libwebp
// For more information on WebP image format, and libwebp library, see:
@@ -60,21 +59,6 @@
return nullptr;
}
- const int width = WebPDemuxGetI(demux, WEBP_FF_CANVAS_WIDTH);
- const int height = WebPDemuxGetI(demux, WEBP_FF_CANVAS_HEIGHT);
-
- // Sanity check for image size that's about to be decoded.
- {
- const int64_t size = sk_64_mul(width, height);
- if (!sk_64_isS32(size)) {
- return nullptr;
- }
- // now check that if we are 4-bytes per pixel, we also don't overflow
- if (sk_64_asS32(size) > (0x7FFFFFFF >> 2)) {
- return nullptr;
- }
- }
-
WebPChunkIterator chunkIterator;
SkAutoTCallVProc<WebPChunkIterator, WebPDemuxReleaseChunkIterator> autoCI(&chunkIterator);
sk_sp<SkColorSpace> colorSpace = nullptr;
@@ -89,15 +73,36 @@
colorSpace = SkColorSpace::MakeNamed(SkColorSpace::kSRGB_Named);
}
- // Get the first frame and its "features" to determine the color and alpha types.
- // Since we do not yet support animated webp, this is the only frame that we will
- // decode.
+ // Since we do not yet support animation, we get the |width|, |height|, |color|, and |alpha|
+ // from the first frame. It's the only frame we will decode.
+ //
+ // TODO:
+ // When we support animation, we'll want to report the canvas width and canvas height instead.
+ // We can get these from the |demux| directly.
+ // What |color| and |alpha| will we want to report though? WebP allows different frames
+ // to be encoded in different ways, making the encoded format difficult to describe.
WebPIterator frame;
SkAutoTCallVProc<WebPIterator, WebPDemuxReleaseIterator> autoFrame(&frame);
if (!WebPDemuxGetFrame(demux, 1, &frame)) {
return nullptr;
}
+ // Sanity check for image size that's about to be decoded.
+ {
+ const int64_t size = sk_64_mul(frame.width, frame.height);
+ if (!sk_64_isS32(size)) {
+ return nullptr;
+ }
+ // now check that if we are 4-bytes per pixel, we also don't overflow
+ if (sk_64_asS32(size) > (0x7FFFFFFF >> 2)) {
+ return nullptr;
+ }
+ }
+
+ // TODO:
+ // The only reason we actually need to call WebPGetFeatures() is to get the |features.format|.
+ // This call actually re-reads the frame header. Should we suggest that libwebp expose
+ // the format on the |frame|?
WebPBitstreamFeatures features;
VP8StatusCode status = WebPGetFeatures(frame.fragment.bytes, frame.fragment.size, &features);
if (VP8_STATUS_OK != status) {
@@ -108,8 +113,8 @@
SkEncodedInfo::Alpha alpha;
switch (features.format) {
case 0:
- // This indicates a "mixed" format. We could see this for
- // animated webps (multiple fragments).
+ // This indicates a "mixed" format. We would see this for
+ // animated webps or for webps encoded in multiple fragments.
// I believe that this is a rare case.
// We could also guess kYUV here, but I think it makes more
// sense to guess kBGRA which is likely closer to the final
@@ -120,7 +125,7 @@
break;
case 1:
// This is the lossy format (YUV).
- if (SkToBool(features.has_alpha) || frame.width != width || frame.height != height) {
+ if (SkToBool(features.has_alpha)) {
color = SkEncodedInfo::kYUVA_Color;
alpha = SkEncodedInfo::kUnpremul_Alpha;
} else {
@@ -138,9 +143,9 @@
}
SkEncodedInfo info = SkEncodedInfo::Make(color, alpha, 8);
- SkWebpCodec* codecOut = new SkWebpCodec(width, height, info, std::move(colorSpace),
- streamDeleter.release(), demux.release(),
- std::move(data));
+ SkWebpCodec* codecOut = new SkWebpCodec(features.width, features.height, info,
+ std::move(colorSpace), streamDeleter.release(),
+ demux.release(), std::move(data));
codecOut->setUnsupportedICC(unsupportedICC);
return codecOut;
}
@@ -212,85 +217,48 @@
// Free any memory associated with the buffer. Must be called last, so we declare it first.
SkAutoTCallVProc<WebPDecBuffer, WebPFreeDecBuffer> autoFree(&(config.output));
- WebPIterator frame;
- SkAutoTCallVProc<WebPIterator, WebPDemuxReleaseIterator> autoFrame(&frame);
- // If this succeeded in NewFromStream(), it should succeed again here.
- SkAssertResult(WebPDemuxGetFrame(fDemux, 1, &frame));
-
- // Get the frameRect. libwebp will have already signaled an error if this is not fully
- // contained by the canvas.
- auto frameRect = SkIRect::MakeXYWH(frame.x_offset, frame.y_offset, frame.width, frame.height);
- SkASSERT(this->getInfo().bounds().contains(frameRect));
- bool frameIsSubset = frameRect.size() != this->getInfo().dimensions();
- if (frameIsSubset) {
- SkSampler::Fill(dstInfo, dst, rowBytes, 0, options.fZeroInitialized);
- }
-
- int dstX = frameRect.x();
- int dstY = frameRect.y();
- int subsetWidth = frameRect.width();
- int subsetHeight = frameRect.height();
+ SkIRect bounds = SkIRect::MakeSize(this->getInfo().dimensions());
if (options.fSubset) {
- SkIRect subset = *options.fSubset;
- SkASSERT(this->getInfo().bounds().contains(subset));
- SkASSERT(SkIsAlign2(subset.fLeft) && SkIsAlign2(subset.fTop));
- SkASSERT(this->getValidSubset(&subset) && subset == *options.fSubset);
-
- if (!SkIRect::IntersectsNoEmptyCheck(subset, frameRect)) {
- return kSuccess;
+ // Caller is requesting a subset.
+ if (!bounds.contains(*options.fSubset)) {
+ // The subset is out of bounds.
+ return kInvalidParameters;
}
- int minXOffset = SkTMin(dstX, subset.x());
- int minYOffset = SkTMin(dstY, subset.y());
- dstX -= minXOffset;
- dstY -= minYOffset;
- frameRect.offset(-minXOffset, -minYOffset);
- subset.offset(-minXOffset, -minYOffset);
+ bounds = *options.fSubset;
- // Just like we require that the requested subset x and y offset are even, libwebp
- // guarantees that the frame x and y offset are even (it's actually impossible to specify
- // an odd frame offset). So we can still guarantee that the adjusted offsets are even.
- SkASSERT(SkIsAlign2(subset.fLeft) && SkIsAlign2(subset.fTop));
+ // This is tricky. libwebp snaps the top and left to even values. We could let libwebp
+ // do the snap, and return a subset which is a different one than requested. The problem
+ // with that approach is that the caller may try to stitch subsets together, and if we
+ // returned different subsets than requested, there would be artifacts at the boundaries.
+ // Instead, we report that we cannot support odd values for top and left..
+ if (!SkIsAlign2(bounds.fLeft) || !SkIsAlign2(bounds.fTop)) {
+ return kInvalidParameters;
+ }
- SkIRect intersection;
- SkAssertResult(intersection.intersect(frameRect, subset));
- subsetWidth = intersection.width();
- subsetHeight = intersection.height();
+#ifdef SK_DEBUG
+ {
+ // Make a copy, since getValidSubset can change its input.
+ SkIRect subset(bounds);
+ // That said, getValidSubset should *not* change its input, in this case; otherwise
+ // getValidSubset does not match the actual subsets we can do.
+ SkASSERT(this->getValidSubset(&subset) && subset == bounds);
+ }
+#endif
config.options.use_cropping = 1;
- config.options.crop_left = subset.x();
- config.options.crop_top = subset.y();
- config.options.crop_width = subsetWidth;
- config.options.crop_height = subsetHeight;
+ config.options.crop_left = bounds.fLeft;
+ config.options.crop_top = bounds.fTop;
+ config.options.crop_width = bounds.width();
+ config.options.crop_height = bounds.height();
}
- // Ignore the frame size and offset when determining if scaling is necessary.
- int scaledWidth = subsetWidth;
- int scaledHeight = subsetHeight;
- SkISize srcSize = options.fSubset ? options.fSubset->size() : this->getInfo().dimensions();
- if (srcSize != dstInfo.dimensions()) {
+ SkISize dstDimensions = dstInfo.dimensions();
+ if (bounds.size() != dstDimensions) {
+ // Caller is requesting scaling.
config.options.use_scaling = 1;
-
- if (frameIsSubset) {
- float scaleX = ((float) dstInfo.width()) / srcSize.width();
- float scaleY = ((float) dstInfo.height()) / srcSize.height();
-
- // We need to be conservative here and floor rather than round.
- // Otherwise, we may find ourselves decoding off the end of memory.
- dstX = scaleX * dstX;
- scaledWidth = scaleX * scaledWidth;
- dstY = scaleY * dstY;
- scaledHeight = scaleY * scaledHeight;
- if (0 == scaledWidth || 0 == scaledHeight) {
- return kSuccess;
- }
- } else {
- scaledWidth = dstInfo.width();
- scaledHeight = dstInfo.height();
- }
-
- config.options.scaled_width = scaledWidth;
- config.options.scaled_height = scaledHeight;
+ config.options.scaled_width = dstDimensions.width();
+ config.options.scaled_height = dstDimensions.height();
}
// Swizzling between RGBA and BGRA is zero cost in a color transform. So when we have a
@@ -306,17 +274,21 @@
// does not provide a row-by-row API. This is a shame particularly in the F16 case,
// where we need to allocate an extra image-sized buffer.
SkAutoTMalloc<uint32_t> pixels;
- bool isF16 = kRGBA_F16_SkColorType == dstInfo.colorType();
- void* webpDst = isF16 ? pixels.reset(dstInfo.width() * dstInfo.height()) : dst;
- size_t webpRowBytes = isF16 ? dstInfo.width() * sizeof(uint32_t) : rowBytes;
- size_t totalBytes = isF16 ? webpRowBytes * dstInfo.height() : dstInfo.getSafeSize(webpRowBytes);
- size_t dstBpp = SkColorTypeBytesPerPixel(dstInfo.colorType());
- size_t webpBpp = isF16 ? sizeof(uint32_t) : dstBpp;
+ if (kRGBA_F16_SkColorType == dstInfo.colorType()) {
+ pixels.reset(dstDimensions.width() * dstDimensions.height());
+ config.output.u.RGBA.rgba = (uint8_t*) pixels.get();
+ config.output.u.RGBA.stride = (int) dstDimensions.width() * sizeof(uint32_t);
+ config.output.u.RGBA.size = config.output.u.RGBA.stride * dstDimensions.height();
+ } else {
+ config.output.u.RGBA.rgba = (uint8_t*) dst;
+ config.output.u.RGBA.stride = (int) rowBytes;
+ config.output.u.RGBA.size = dstInfo.getSafeSize(rowBytes);
+ }
- size_t offset = dstX * webpBpp + dstY * webpRowBytes;
- config.output.u.RGBA.rgba = SkTAddOffset<uint8_t>(webpDst, offset);
- config.output.u.RGBA.stride = (int) webpRowBytes;
- config.output.u.RGBA.size = totalBytes - offset;
+ WebPIterator frame;
+ SkAutoTCallVProc<WebPIterator, WebPDemuxReleaseIterator> autoFrame(&frame);
+ // If this succeeded in NewFromStream(), it should succeed again here.
+ SkAssertResult(WebPDemuxGetFrame(fDemux, 1, &frame));
SkAutoTCallVProc<WebPIDecoder, WebPIDelete> idec(WebPIDecode(nullptr, 0, &config));
if (!idec) {
@@ -327,12 +299,12 @@
SkCodec::Result result;
switch (WebPIUpdate(idec, frame.fragment.bytes, frame.fragment.size)) {
case VP8_STATUS_OK:
- rowsDecoded = scaledHeight;
+ rowsDecoded = dstInfo.height();
result = kSuccess;
break;
case VP8_STATUS_SUSPENDED:
- WebPIDecGetRGB(idec, &rowsDecoded, nullptr, nullptr, nullptr);
- *rowsDecodedPtr = rowsDecoded + dstY;
+ WebPIDecGetRGB(idec, rowsDecodedPtr, nullptr, nullptr, nullptr);
+ rowsDecoded = *rowsDecodedPtr;
result = kIncompleteInput;
break;
default:
@@ -344,15 +316,14 @@
SkAlphaType xformAlphaType = select_xform_alpha(dstInfo.alphaType(),
this->getInfo().alphaType());
- uint32_t* xformSrc = (uint32_t*) config.output.u.RGBA.rgba;
- void* xformDst = SkTAddOffset<void>(dst, dstBpp * dstX + rowBytes * dstY);
+ uint32_t* src = (uint32_t*) config.output.u.RGBA.rgba;
size_t srcRowBytes = config.output.u.RGBA.stride;
for (int y = 0; y < rowsDecoded; y++) {
- SkAssertResult(this->colorXform()->apply(dstColorFormat, xformDst,
- SkColorSpaceXform::kBGRA_8888_ColorFormat, xformSrc, scaledWidth,
+ SkAssertResult(this->colorXform()->apply(dstColorFormat, dst,
+ SkColorSpaceXform::kBGRA_8888_ColorFormat, src, dstInfo.width(),
xformAlphaType));
- xformDst = SkTAddOffset<void>(xformDst, rowBytes);
- xformSrc = SkTAddOffset<uint32_t>(xformSrc, srcRowBytes);
+ dst = SkTAddOffset<void>(dst, rowBytes);
+ src = SkTAddOffset<uint32_t>(src, srcRowBytes);
}
}
diff --git a/tests/CodecTest.cpp b/tests/CodecTest.cpp
index 8a4d6fc..4083cfa 100644
--- a/tests/CodecTest.cpp
+++ b/tests/CodecTest.cpp
@@ -662,8 +662,6 @@
test_invalid(r, "empty_images/zero-height.wbmp");
// This image is an ico with an embedded mask-bmp. This is illegal.
test_invalid(r, "invalid_images/mask-bmp-ico.ico");
- // It is illegal for a webp frame to not be fully contained by the canvas.
- test_invalid(r, "invalid_images/invalid-offset.webp");
#if defined(SK_CODEC_DECODES_RAW) && (!defined(_WIN32))
test_invalid(r, "empty_images/zero_height.tiff");
#endif