Changeset 86816 in webkit


Ignore:
Timestamp:
May 18, 2011 8:21:04 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-05-18 Nat Duca <nduca@chromium.org>

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 <nduca@chromium.org>

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):
Location:
trunk/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r86815 r86816  
     12011-05-18  Nat Duca  <nduca@chromium.org>
     2
     3        Reviewed by James Robinson.
     4
     5        [chromium] Add histograms for paint times
     6        https://bugs.webkit.org/show_bug.cgi?id=61010
     7
     8        * platform/graphics/chromium/ContentLayerChromium.cpp:
     9        (WebCore::ContentLayerPainter::paint):
     10
    1112011-05-18  Adrienne Walker  <enne@google.com>
    212
  • trunk/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp

    r86805 r86816  
    4242#include "LayerTextureUpdaterCanvas.h"
    4343#include "LayerTilerChromium.h"
     44#include "PlatformBridge.h"
    4445#include "RenderLayerBacking.h"
    4546#include "TextStream.h"
     47#include <wtf/CurrentTime.h>
    4648
    4749// Maximum size the width or height of this layer can be before enabling tiling
     
    6466    virtual void paint(GraphicsContext& context, const IntRect& contentRect)
    6567    {
     68        double paintStart = currentTime();
    6669        context.clearRect(contentRect);
    6770        context.clip(contentRect);
    6871        m_owner->paintGraphicsLayerContents(context, contentRect);
     72        double paintEnd = currentTime();
     73        double pixelsPerSec = (contentRect.width() * contentRect.height()) / (paintEnd - paintStart);
     74        PlatformBridge::histogramCustomCounts("Renderer4.AccelContentPaintDurationMS", (paintEnd - paintStart) * 1000, 0, 120, 30);
     75        PlatformBridge::histogramCustomCounts("Renderer4.AccelContentPaintMegapixPerSecond", pixelsPerSec / 1000000, 10, 210, 30);
    6976    }
    7077private:
  • trunk/Source/WebKit/chromium/ChangeLog

    r86813 r86816  
     12011-05-18  Nat Duca  <nduca@chromium.org>
     2
     3        Reviewed by James Robinson.
     4
     5        [chromium] Add histograms for paint times
     6        https://bugs.webkit.org/show_bug.cgi?id=61010
     7
     8        * src/WebViewImpl.cpp:
     9        (WebKit::WebViewImpl::animate):
     10        (WebKit::WebViewImpl::layout):
     11        (WebKit::WebViewImpl::paint):
     12        (WebKit::WebViewImplContentPainter::paint):
     13
    1142011-05-17  MORITA Hajime  <morrita@google.com>
    215
  • trunk/Source/WebKit/chromium/src/WebViewImpl.cpp

    r86805 r86816  
    10051005void WebViewImpl::animate()
    10061006{
     1007    TRACE_EVENT("WebViewImpl::animate", this, 0);
    10071008#if ENABLE(REQUEST_ANIMATION_FRAME)
    10081009    WebFrameImpl* webframe = mainFrameImpl();
     
    10221023void WebViewImpl::layout()
    10231024{
     1025    TRACE_EVENT("WebViewImpl::layout", this, 0);
    10241026#if USE(ACCELERATED_COMPOSITING)
    10251027    // FIXME: RTL style not supported by the compositor yet.
     
    10971099#endif
    10981100    } else {
     1101        double paintStart = currentTime();
    10991102        WebFrameImpl* webframe = mainFrameImpl();
    11001103        if (webframe)
    11011104            webframe->paint(canvas, rect);
     1105        double paintEnd = currentTime();
     1106        double pixelsPerSec = (rect.width * rect.height) / (paintEnd - paintStart);
     1107        PlatformBridge::histogramCustomCounts("Renderer4.SoftwarePaintDurationMS", (paintEnd - paintStart) * 1000, 0, 120, 30);
     1108        PlatformBridge::histogramCustomCounts("Renderer4.SoftwarePaintMegapixPerSecond", pixelsPerSec / 1000000, 10, 210, 30);
    11021109    }
    11031110}
     
    24212428    virtual void paint(GraphicsContext& context, const IntRect& contentRect)
    24222429    {
     2430        double paintStart = currentTime();
    24232431        Page* page = m_webViewImpl->page();
    24242432        if (!page)
     
    24262434        FrameView* view = page->mainFrame()->view();
    24272435        view->paintContents(&context, contentRect);
     2436        double paintEnd = currentTime();
     2437        double pixelsPerSec = (contentRect.width() * contentRect.height()) / (paintEnd - paintStart);
     2438        PlatformBridge::histogramCustomCounts("Renderer4.AccelRootPaintDurationMS", (paintEnd - paintStart) * 1000, 0, 120, 30);
     2439        PlatformBridge::histogramCustomCounts("Renderer4.AccelRootPaintMegapixPerSecond", pixelsPerSec / 1000000, 10, 210, 30);
    24282440    }
    24292441
Note: See TracChangeset for help on using the changeset viewer.