+2012-02-23 Justin Novosad <junov@chromium.org>
+
+ [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 <shinyak@chromium.org>
ShadowRootList should have recalculation flag instead of ShadowRoot.
void Canvas2DLayerChromium::paintContentsIfDirty(const Region& /* occludedScreenSpace */)
{
+ TRACE_EVENT("Canvas2DLayerChromium::paintContentsIfDirty", this, 0);
if (!drawsContent())
return;
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();
}
#include <wtf/MathExtras.h>
#include <wtf/Vector.h>
+#if PLATFORM(CHROMIUM)
+#include "TraceEvent.h"
+#endif
+
namespace WebCore {
// State -----------------------------------------------------------------------
const SkBitmap* PlatformContextSkia::bitmap() const
{
+#if PLATFORM(CHROMIUM)
+ TRACE_EVENT("PlatformContextSkia::bitmap", this, 0);
+#endif
return &m_canvas->getDevice()->accessBitmap(false);
}