Title: [108714] trunk/Source/WebCore
Revision
108714
Author
[email protected]
Date
2012-02-23 19:03:52 -0800 (Thu, 23 Feb 2012)

Log Message

[Chromium] Add profiling trace for deferred canvas rendering
https://bugs.webkit.org/show_bug.cgi?id=79376

Patch by Justin Novosad <[email protected]> on 2012-02-23
Reviewed by Stephen White.

No new tests.

* platform/graphics/chromium/Canvas2DLayerChromium.cpp:
(WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
Profiling trace for the entire method, as well as for
calls to canvas flush and context flush, both of which may
cause deferred operation to be executed.
* platform/graphics/skia/PlatformContextSkia.cpp:
(WebCore::PlatformContextSkia::bitmap):
Inserting a profiling trace in this method because it may cause
deferred draw commands to be executed.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (108713 => 108714)


--- trunk/Source/WebCore/ChangeLog	2012-02-24 02:37:02 UTC (rev 108713)
+++ trunk/Source/WebCore/ChangeLog	2012-02-24 03:03:52 UTC (rev 108714)
@@ -1,3 +1,22 @@
+2012-02-23  Justin Novosad  <[email protected]>
+
+        [Chromium] Add profiling trace for deferred canvas rendering
+        https://bugs.webkit.org/show_bug.cgi?id=79376
+
+        Reviewed by Stephen White.
+
+        No new tests.
+
+        * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
+        (WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
+        Profiling trace for the entire method, as well as for
+        calls to canvas flush and context flush, both of which may
+        cause deferred operation to be executed.
+        * platform/graphics/skia/PlatformContextSkia.cpp:
+        (WebCore::PlatformContextSkia::bitmap):
+        Inserting a profiling trace in this method because it may cause
+        deferred draw commands to be executed.
+
 2012-02-23  Shinya Kawanaka  <[email protected]>
 
         ShadowRootList should have recalculation flag instead of ShadowRoot.

Modified: trunk/Source/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.cpp (108713 => 108714)


--- trunk/Source/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.cpp	2012-02-24 02:37:02 UTC (rev 108713)
+++ trunk/Source/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.cpp	2012-02-24 03:03:52 UTC (rev 108714)
@@ -97,6 +97,7 @@
 
 void Canvas2DLayerChromium::paintContentsIfDirty(const Region& /* occludedScreenSpace */)
 {
+    TRACE_EVENT("Canvas2DLayerChromium::paintContentsIfDirty", this, 0);
     if (!drawsContent())
         return;
 
@@ -111,9 +112,12 @@
     bool success = m_context->makeContextCurrent();
     ASSERT_UNUSED(success, success);
 
-    if (m_canvas)
+    if (m_canvas) {
+        TRACE_EVENT("SkDeferredCanvas::flush", m_canvas, 0);
         m_canvas->flush();
+    }
 
+    TRACE_EVENT("GrContext::flush", m_context, 0);
     m_context->flush();
 }
 

Modified: trunk/Source/WebCore/platform/graphics/skia/PlatformContextSkia.cpp (108713 => 108714)


--- trunk/Source/WebCore/platform/graphics/skia/PlatformContextSkia.cpp	2012-02-24 02:37:02 UTC (rev 108713)
+++ trunk/Source/WebCore/platform/graphics/skia/PlatformContextSkia.cpp	2012-02-24 03:03:52 UTC (rev 108714)
@@ -52,6 +52,10 @@
 #include <wtf/MathExtras.h>
 #include <wtf/Vector.h>
 
+#if PLATFORM(CHROMIUM)
+#include "TraceEvent.h"
+#endif
+
 namespace WebCore {
 
 // State -----------------------------------------------------------------------
@@ -551,6 +555,9 @@
 
 const SkBitmap* PlatformContextSkia::bitmap() const
 {
+#if PLATFORM(CHROMIUM)
+    TRACE_EVENT("PlatformContextSkia::bitmap", this, 0);
+#endif
     return &m_canvas->getDevice()->accessBitmap(false);
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to