Title: [217567] trunk
- Revision
- 217567
- Author
- [email protected]
- Date
- 2017-05-30 13:02:09 -0700 (Tue, 30 May 2017)
Log Message
REGRESSION(r216882): No image decoding is needed if the BitmapImage is created with a NativeImage
https://bugs.webkit.org/show_bug.cgi?id=172670
Patch by Said Abou-Hallawa <[email protected]> on 2017-05-30
Reviewed by Tim Horton.
Source/WebCore:
Test: fast/images/large-image-webkit-canvas.html
Check whether the BitmapImage has created an ImageDecoder before trying
to decode its image frame.
* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::shouldUseAsyncDecoding):
LayoutTests:
Use the css property -webkit-canvas to force capturing the canvas context
in a NativeImage. This NativeImage will be used to create a BitmapImage
which will be later used as the background-image of an element.
* fast/images/large-image-webkit-canvas-expected.html: Added.
* fast/images/large-image-webkit-canvas.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (217566 => 217567)
--- trunk/LayoutTests/ChangeLog 2017-05-30 19:57:18 UTC (rev 217566)
+++ trunk/LayoutTests/ChangeLog 2017-05-30 20:02:09 UTC (rev 217567)
@@ -1,3 +1,17 @@
+2017-05-30 Said Abou-Hallawa <[email protected]>
+
+ REGRESSION(r216882): No image decoding is needed if the BitmapImage is created with a NativeImage
+ https://bugs.webkit.org/show_bug.cgi?id=172670
+
+ Reviewed by Tim Horton.
+
+ Use the css property -webkit-canvas to force capturing the canvas context
+ in a NativeImage. This NativeImage will be used to create a BitmapImage
+ which will be later used as the background-image of an element.
+
+ * fast/images/large-image-webkit-canvas-expected.html: Added.
+ * fast/images/large-image-webkit-canvas.html: Added.
+
2017-05-30 Matt Lewis <[email protected]>
Changed Text Expectations of imported/blink/storage/indexeddb/blob-valid-after-deletion.html
Added: trunk/LayoutTests/fast/images/large-image-webkit-canvas-expected.html (0 => 217567)
--- trunk/LayoutTests/fast/images/large-image-webkit-canvas-expected.html (rev 0)
+++ trunk/LayoutTests/fast/images/large-image-webkit-canvas-expected.html 2017-05-30 20:02:09 UTC (rev 217567)
@@ -0,0 +1,10 @@
+<style>
+ .green-background {
+ width: 400px;
+ height: 400px;
+ background-color: green;
+ }
+</style>
+<body>
+ <div class="green-background"></div>
+</body>
Added: trunk/LayoutTests/fast/images/large-image-webkit-canvas.html (0 => 217567)
--- trunk/LayoutTests/fast/images/large-image-webkit-canvas.html (rev 0)
+++ trunk/LayoutTests/fast/images/large-image-webkit-canvas.html 2017-05-30 20:02:09 UTC (rev 217567)
@@ -0,0 +1,16 @@
+<style>
+ .green-background {
+ width: 400px;
+ height: 400px;
+ background: -webkit-canvas(large-canvas) no-repeat 50% 50%;
+ }
+</style>
+<body>
+ <div class="green-background"></div>
+ <script>
+ var ctx = document.getCSSCanvasContext('2d', 'large-canvas', 400, 400);
+ ctx.fillStyle = 'green';
+ ctx.fillRect(0, 0, 400, 400);
+ </script>
+</body>
+
Modified: trunk/Source/WebCore/ChangeLog (217566 => 217567)
--- trunk/Source/WebCore/ChangeLog 2017-05-30 19:57:18 UTC (rev 217566)
+++ trunk/Source/WebCore/ChangeLog 2017-05-30 20:02:09 UTC (rev 217567)
@@ -1,3 +1,18 @@
+2017-05-30 Said Abou-Hallawa <[email protected]>
+
+ REGRESSION(r216882): No image decoding is needed if the BitmapImage is created with a NativeImage
+ https://bugs.webkit.org/show_bug.cgi?id=172670
+
+ Reviewed by Tim Horton.
+
+ Test: fast/images/large-image-webkit-canvas.html
+
+ Check whether the BitmapImage has created an ImageDecoder before trying
+ to decode its image frame.
+
+ * platform/graphics/ImageSource.cpp:
+ (WebCore::ImageSource::shouldUseAsyncDecoding):
+
2017-05-30 Youenn Fablet <[email protected]>
RealtimeOutgoingVideoSource should not rotate muted frames
Modified: trunk/Source/WebCore/platform/graphics/ImageSource.cpp (217566 => 217567)
--- trunk/Source/WebCore/platform/graphics/ImageSource.cpp 2017-05-30 19:57:18 UTC (rev 217566)
+++ trunk/Source/WebCore/platform/graphics/ImageSource.cpp 2017-05-30 20:02:09 UTC (rev 217567)
@@ -151,6 +151,8 @@
bool ImageSource::shouldUseAsyncDecoding()
{
+ if (!isDecoderAvailable())
+ return false;
// FIXME: figure out the best heuristic for enabling async image decoding.
return size().area() * sizeof(RGBA32) >= (frameCount() > 1 ? 100 * KB : 500 * KB);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes