Title: [87517] trunk/Source/WebKit2
Revision
87517
Author
carlo...@webkit.org
Date
2011-05-27 09:14:39 -0700 (Fri, 27 May 2011)

Log Message

2011-05-27  Carlos Garcia Campos  <cgar...@igalia.com>

        Reviewed by Martin Robinson.

        [CAIRO] Don't copy the surface before drawing it into the context in ShareableBitmap::paint()
        https://bugs.webkit.org/show_bug.cgi?id=60757

        cairo_image_surface_create_for_data() is already a shallow copy of
        the image, so we don't need to copy it again.

        * Shared/cairo/ShareableBitmapCairo.cpp:
        (WebKit::ShareableBitmap::paint):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (87516 => 87517)


--- trunk/Source/WebKit2/ChangeLog	2011-05-27 16:10:00 UTC (rev 87516)
+++ trunk/Source/WebKit2/ChangeLog	2011-05-27 16:14:39 UTC (rev 87517)
@@ -1,3 +1,16 @@
+2011-05-27  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        Reviewed by Martin Robinson.
+
+        [CAIRO] Don't copy the surface before drawing it into the context in ShareableBitmap::paint()
+        https://bugs.webkit.org/show_bug.cgi?id=60757
+
+        cairo_image_surface_create_for_data() is already a shallow copy of
+        the image, so we don't need to copy it again.
+
+        * Shared/cairo/ShareableBitmapCairo.cpp:
+        (WebKit::ShareableBitmap::paint):
+
 2011-05-26  Jeff Miller  <je...@apple.com>
 
         Reviewed by Alexey Proskuryakov.

Modified: trunk/Source/WebKit2/Shared/cairo/ShareableBitmapCairo.cpp (87516 => 87517)


--- trunk/Source/WebKit2/Shared/cairo/ShareableBitmapCairo.cpp	2011-05-27 16:10:00 UTC (rev 87516)
+++ trunk/Source/WebKit2/Shared/cairo/ShareableBitmapCairo.cpp	2011-05-27 16:14:39 UTC (rev 87517)
@@ -50,11 +50,8 @@
                                                                                    CAIRO_FORMAT_ARGB32,
                                                                                    m_size.width(), m_size.height(),
                                                                                    m_size.width() * 4));
-
-    // This copy is not copy-on-write, so this is probably sub-optimal.
-    RefPtr<cairo_surface_t> surfaceCopy = copyCairoImageSurface(surface.get());
     FloatRect destRect(dstPoint, srcRect.size());
-    context.platformContext()->drawSurfaceToContext(surfaceCopy.get(), destRect, srcRect, &context);
+    context.platformContext()->drawSurfaceToContext(surface.get(), destRect, srcRect, &context);
 }
 
 PassRefPtr<cairo_surface_t> ShareableBitmap::createCairoSurface()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to