Title: [113373] trunk/Source/WebCore
Revision
113373
Author
[email protected]
Date
2012-04-05 13:44:11 -0700 (Thu, 05 Apr 2012)

Log Message

[chromium] Drawing an accelerated canvas onto itself is slow.
https://bugs.webkit.org/show_bug.cgi?id=83295

Fixed by using a GPU-side deepCopy() in skia, so we don't trigger a
readback and re-upload.

Reviewed by James Robinson.

Correctness is covered by existing tests. Performance is covered
by the test case attached to the bug.

* platform/graphics/skia/ImageSkia.cpp:
(WebCore::BitmapImageSingleFrameSkia::create):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (113372 => 113373)


--- trunk/Source/WebCore/ChangeLog	2012-04-05 20:35:09 UTC (rev 113372)
+++ trunk/Source/WebCore/ChangeLog	2012-04-05 20:44:11 UTC (rev 113373)
@@ -1,3 +1,19 @@
+2012-04-05  Stephen White  <[email protected]>
+
+        [chromium] Drawing an accelerated canvas onto itself is slow.
+        https://bugs.webkit.org/show_bug.cgi?id=83295
+
+        Fixed by using a GPU-side deepCopy() in skia, so we don't trigger a
+        readback and re-upload.
+
+        Reviewed by James Robinson.
+
+        Correctness is covered by existing tests. Performance is covered
+        by the test case attached to the bug.
+
+        * platform/graphics/skia/ImageSkia.cpp:
+        (WebCore::BitmapImageSingleFrameSkia::create):
+
 2012-04-05  Dana Jansens  <[email protected]>
 
         [chromium] Record the number of tiles paint-culled instead of the incorrect number of pixels

Modified: trunk/Source/WebCore/platform/graphics/skia/ImageSkia.cpp (113372 => 113373)


--- trunk/Source/WebCore/platform/graphics/skia/ImageSkia.cpp	2012-04-05 20:35:09 UTC (rev 113372)
+++ trunk/Source/WebCore/platform/graphics/skia/ImageSkia.cpp	2012-04-05 20:44:11 UTC (rev 113373)
@@ -479,7 +479,8 @@
 {
     if (copyPixels) {
         SkBitmap temp;
-        bitmap.copyTo(&temp, bitmap.config());
+        if (!bitmap.deepCopyTo(&temp, bitmap.config()))
+            bitmap.copyTo(&temp, bitmap.config());
         return adoptRef(new BitmapImageSingleFrameSkia(temp));
     }
     return adoptRef(new BitmapImageSingleFrameSkia(bitmap));
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to