Title: [86816] trunk/Source
Revision
86816
Author
[email protected]
Date
2011-05-18 20:21:04 -0700 (Wed, 18 May 2011)

Log Message

2011-05-18  Nat Duca  <[email protected]>

        Reviewed by James Robinson.

        [chromium] Add histograms for paint times
        https://bugs.webkit.org/show_bug.cgi?id=61010

        * platform/graphics/chromium/ContentLayerChromium.cpp:
        (WebCore::ContentLayerPainter::paint):
2011-05-18  Nat Duca  <[email protected]>

        Reviewed by James Robinson.

        [chromium] Add histograms for paint times
        https://bugs.webkit.org/show_bug.cgi?id=61010

        * src/WebViewImpl.cpp:
        (WebKit::WebViewImpl::animate):
        (WebKit::WebViewImpl::layout):
        (WebKit::WebViewImpl::paint):
        (WebKit::WebViewImplContentPainter::paint):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (86815 => 86816)


--- trunk/Source/WebCore/ChangeLog	2011-05-19 02:41:30 UTC (rev 86815)
+++ trunk/Source/WebCore/ChangeLog	2011-05-19 03:21:04 UTC (rev 86816)
@@ -1,3 +1,13 @@
+2011-05-18  Nat Duca  <[email protected]>
+
+        Reviewed by James Robinson.
+
+        [chromium] Add histograms for paint times
+        https://bugs.webkit.org/show_bug.cgi?id=61010
+
+        * platform/graphics/chromium/ContentLayerChromium.cpp:
+        (WebCore::ContentLayerPainter::paint):
+
 2011-05-18  Adrienne Walker  <[email protected]>
 
         Reviewed by James Robinson.

Modified: trunk/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp (86815 => 86816)


--- trunk/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp	2011-05-19 02:41:30 UTC (rev 86815)
+++ trunk/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp	2011-05-19 03:21:04 UTC (rev 86816)
@@ -41,8 +41,10 @@
 #include "LayerTexture.h"
 #include "LayerTextureUpdaterCanvas.h"
 #include "LayerTilerChromium.h"
+#include "PlatformBridge.h"
 #include "RenderLayerBacking.h"
 #include "TextStream.h"
+#include <wtf/CurrentTime.h>
 
 // Maximum size the width or height of this layer can be before enabling tiling
 // when m_tilingOption == AutoTile.
@@ -63,9 +65,14 @@
 
     virtual void paint(GraphicsContext& context, const IntRect& contentRect)
     {
+        double paintStart = currentTime();
         context.clearRect(contentRect);
         context.clip(contentRect);
         m_owner->paintGraphicsLayerContents(context, contentRect);
+        double paintEnd = currentTime();
+        double pixelsPerSec = (contentRect.width() * contentRect.height()) / (paintEnd - paintStart);
+        PlatformBridge::histogramCustomCounts("Renderer4.AccelContentPaintDurationMS", (paintEnd - paintStart) * 1000, 0, 120, 30);
+        PlatformBridge::histogramCustomCounts("Renderer4.AccelContentPaintMegapixPerSecond", pixelsPerSec / 1000000, 10, 210, 30);
     }
 private:
     GraphicsLayerChromium* m_owner;

Modified: trunk/Source/WebKit/chromium/ChangeLog (86815 => 86816)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-05-19 02:41:30 UTC (rev 86815)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-05-19 03:21:04 UTC (rev 86816)
@@ -1,3 +1,16 @@
+2011-05-18  Nat Duca  <[email protected]>
+
+        Reviewed by James Robinson.
+
+        [chromium] Add histograms for paint times
+        https://bugs.webkit.org/show_bug.cgi?id=61010
+
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::animate):
+        (WebKit::WebViewImpl::layout):
+        (WebKit::WebViewImpl::paint):
+        (WebKit::WebViewImplContentPainter::paint):
+
 2011-05-17  MORITA Hajime  <[email protected]>
 
         Reviewed by Tony Chang.

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (86815 => 86816)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2011-05-19 02:41:30 UTC (rev 86815)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2011-05-19 03:21:04 UTC (rev 86816)
@@ -1004,6 +1004,7 @@
 
 void WebViewImpl::animate()
 {
+    TRACE_EVENT("WebViewImpl::animate", this, 0);
 #if ENABLE(REQUEST_ANIMATION_FRAME)
     WebFrameImpl* webframe = mainFrameImpl();
     if (webframe) {
@@ -1021,6 +1022,7 @@
 
 void WebViewImpl::layout()
 {
+    TRACE_EVENT("WebViewImpl::layout", this, 0);
 #if USE(ACCELERATED_COMPOSITING)
     // FIXME: RTL style not supported by the compositor yet.
     if (isAcceleratedCompositingActive() && pageHasRTLStyle())
@@ -1096,9 +1098,14 @@
         }
 #endif
     } else {
+        double paintStart = currentTime();
         WebFrameImpl* webframe = mainFrameImpl();
         if (webframe)
             webframe->paint(canvas, rect);
+        double paintEnd = currentTime();
+        double pixelsPerSec = (rect.width * rect.height) / (paintEnd - paintStart);
+        PlatformBridge::histogramCustomCounts("Renderer4.SoftwarePaintDurationMS", (paintEnd - paintStart) * 1000, 0, 120, 30);
+        PlatformBridge::histogramCustomCounts("Renderer4.SoftwarePaintMegapixPerSecond", pixelsPerSec / 1000000, 10, 210, 30);
     }
 }
 
@@ -2420,11 +2427,16 @@
 
     virtual void paint(GraphicsContext& context, const IntRect& contentRect)
     {
+        double paintStart = currentTime();
         Page* page = m_webViewImpl->page();
         if (!page)
             return;
         FrameView* view = page->mainFrame()->view();
         view->paintContents(&context, contentRect);
+        double paintEnd = currentTime();
+        double pixelsPerSec = (contentRect.width() * contentRect.height()) / (paintEnd - paintStart);
+        PlatformBridge::histogramCustomCounts("Renderer4.AccelRootPaintDurationMS", (paintEnd - paintStart) * 1000, 0, 120, 30);
+        PlatformBridge::histogramCustomCounts("Renderer4.AccelRootPaintMegapixPerSecond", pixelsPerSec / 1000000, 10, 210, 30);
     }
 
 private:
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to