Title: [113758] branches/chromium/1084/Source/WebCore/platform/graphics/skia/ImageSkia.cpp
- Revision
- 113758
- Author
- [email protected]
- Date
- 2012-04-10 13:09:08 -0700 (Tue, 10 Apr 2012)
Log Message
Merge 113373 - [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):
[email protected]
Review URL: https://chromiumcodereview.appspot.com/9960076
Modified Paths
Diff
Modified: branches/chromium/1084/Source/WebCore/platform/graphics/skia/ImageSkia.cpp (113757 => 113758)
--- branches/chromium/1084/Source/WebCore/platform/graphics/skia/ImageSkia.cpp 2012-04-10 19:55:18 UTC (rev 113757)
+++ branches/chromium/1084/Source/WebCore/platform/graphics/skia/ImageSkia.cpp 2012-04-10 20:09:08 UTC (rev 113758)
@@ -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