Diff
Modified: trunk/LayoutTests/ChangeLog (118350 => 118351)
--- trunk/LayoutTests/ChangeLog 2012-05-24 11:33:08 UTC (rev 118350)
+++ trunk/LayoutTests/ChangeLog 2012-05-24 11:44:58 UTC (rev 118351)
@@ -1,3 +1,12 @@
+2012-05-17 Andrey Kosyakov <[email protected]>
+
+ Web Inspector: add inspector instrumentation interface for compositing
+ https://bugs.webkit.org/show_bug.cgi?id=83842
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/timeline/timeline-enum-stability-expected.txt: added CompositeLayers.
+
2012-05-24 Vivek Galatage <[email protected]>
Web Inspector: localStorage items are not updated when the storage changes
Modified: trunk/LayoutTests/inspector/timeline/timeline-enum-stability-expected.txt (118350 => 118351)
--- trunk/LayoutTests/inspector/timeline/timeline-enum-stability-expected.txt 2012-05-24 11:33:08 UTC (rev 118350)
+++ trunk/LayoutTests/inspector/timeline/timeline-enum-stability-expected.txt 2012-05-24 11:44:58 UTC (rev 118351)
@@ -9,6 +9,7 @@
Layout : "Layout"
RecalculateStyles : "RecalculateStyles"
Paint : "Paint"
+ CompositeLayers : "CompositeLayers"
ParseHTML : "ParseHTML"
TimerInstall : "TimerInstall"
TimerRemove : "TimerRemove"
Modified: trunk/Source/WebCore/ChangeLog (118350 => 118351)
--- trunk/Source/WebCore/ChangeLog 2012-05-24 11:33:08 UTC (rev 118350)
+++ trunk/Source/WebCore/ChangeLog 2012-05-24 11:44:58 UTC (rev 118351)
@@ -1,3 +1,35 @@
+2012-05-17 Andrey Kosyakov <[email protected]>
+
+ Web Inspector: add inspector instrumentation interface for compositing
+ https://bugs.webkit.org/show_bug.cgi?id=83842
+
+ Reviewed by Pavel Feldman.
+
+ - added instrumentation methods to mark start/end of layer compositing;
+ - added associated timeline record type (CompositeLayers);
+ - plumbed the calls from instrumentation up to the timeline panel;
+ - actual call-sites are platform-specific and will come as separate patches.
+
+ * inspector/InspectorInstrumentation.cpp:
+ (WebCore::InspectorInstrumentation::willCompositeImpl):
+ (WebCore):
+ (WebCore::InspectorInstrumentation::didCompositeImpl):
+ * inspector/InspectorInstrumentation.h:
+ (InspectorInstrumentation):
+ (WebCore::InspectorInstrumentation::willComposite):
+ (WebCore):
+ (WebCore::InspectorInstrumentation::didComposite):
+ * inspector/InspectorTimelineAgent.cpp:
+ (TimelineRecordType):
+ (WebCore::InspectorTimelineAgent::willComposite):
+ (WebCore):
+ (WebCore::InspectorTimelineAgent::didComposite):
+ * inspector/InspectorTimelineAgent.h:
+ (InspectorTimelineAgent):
+ * inspector/front-end/TimelineModel.js:
+ * inspector/front-end/TimelinePresentationModel.js:
+ (WebInspector.TimelinePresentationModel.recordStyle):
+
2012-05-24 Ilya Tikhonovsky <[email protected]>
Unreviewed Web Inspector: remove obsolete isDetailedSnapshot method from HeapSnapshotView.
Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp (118350 => 118351)
--- trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp 2012-05-24 11:33:08 UTC (rev 118350)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp 2012-05-24 11:44:58 UTC (rev 118351)
@@ -466,6 +466,18 @@
pageAgent->didPaint();
}
+void InspectorInstrumentation::willCompositeImpl(InstrumentingAgents* instrumentingAgents)
+{
+ if (InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTimelineAgent())
+ timelineAgent->willComposite();
+}
+
+void InspectorInstrumentation::didCompositeImpl(InstrumentingAgents* instrumentingAgents)
+{
+ if (InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTimelineAgent())
+ timelineAgent->didComposite();
+}
+
InspectorInstrumentationCookie InspectorInstrumentation::willRecalculateStyleImpl(InstrumentingAgents* instrumentingAgents)
{
int timelineAgentId = 0;
Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.h (118350 => 118351)
--- trunk/Source/WebCore/inspector/InspectorInstrumentation.h 2012-05-24 11:33:08 UTC (rev 118350)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.h 2012-05-24 11:44:58 UTC (rev 118351)
@@ -144,6 +144,8 @@
static void didLoadXHR(const InspectorInstrumentationCookie&);
static InspectorInstrumentationCookie willPaint(Frame*, GraphicsContext*, const LayoutRect&);
static void didPaint(const InspectorInstrumentationCookie&);
+ static void willComposite(Page*);
+ static void didComposite(Page*);
static InspectorInstrumentationCookie willRecalculateStyle(Document*);
static void didRecalculateStyle(const InspectorInstrumentationCookie&);
static void didScheduleStyleRecalculation(Document*);
@@ -305,6 +307,8 @@
static void didLoadXHRImpl(const InspectorInstrumentationCookie&);
static InspectorInstrumentationCookie willPaintImpl(InstrumentingAgents*, GraphicsContext*, const LayoutRect&);
static void didPaintImpl(const InspectorInstrumentationCookie&);
+ static void willCompositeImpl(InstrumentingAgents*);
+ static void didCompositeImpl(InstrumentingAgents*);
static InspectorInstrumentationCookie willRecalculateStyleImpl(InstrumentingAgents*);
static void didRecalculateStyleImpl(const InspectorInstrumentationCookie&);
static void didScheduleStyleRecalculationImpl(InstrumentingAgents*, Document*);
@@ -827,6 +831,24 @@
#endif
}
+inline void InspectorInstrumentation::willComposite(Page* page)
+{
+#if ENABLE(INSPECTOR)
+ FAST_RETURN_IF_NO_FRONTENDS(void());
+ if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
+ willCompositeImpl(instrumentingAgents);
+#endif
+}
+
+inline void InspectorInstrumentation::didComposite(Page* page)
+{
+#if ENABLE(INSPECTOR)
+ FAST_RETURN_IF_NO_FRONTENDS(void());
+ if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
+ didCompositeImpl(instrumentingAgents);
+#endif
+}
+
inline InspectorInstrumentationCookie InspectorInstrumentation::willRecalculateStyle(Document* document)
{
#if ENABLE(INSPECTOR)
Modified: trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp (118350 => 118351)
--- trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp 2012-05-24 11:33:08 UTC (rev 118350)
+++ trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp 2012-05-24 11:44:58 UTC (rev 118351)
@@ -59,10 +59,11 @@
// Must be kept in sync with TimelineAgent.js
namespace TimelineRecordType {
static const char EventDispatch[] = "EventDispatch";
+static const char BeginFrame[] = "BeginFrame";
static const char Layout[] = "Layout";
static const char RecalculateStyles[] = "RecalculateStyles";
static const char Paint[] = "Paint";
-static const char BeginFrame[] = "BeginFrame";
+static const char CompositeLayers[] = "CompositeLayers";
static const char ParseHTML[] = "ParseHTML";
@@ -239,6 +240,16 @@
didCompleteCurrentRecord(TimelineRecordType::Paint);
}
+void InspectorTimelineAgent::willComposite()
+{
+ pushCurrentRecord(InspectorObject::create(), TimelineRecordType::CompositeLayers, false);
+}
+
+void InspectorTimelineAgent::didComposite()
+{
+ didCompleteCurrentRecord(TimelineRecordType::CompositeLayers);
+}
+
void InspectorTimelineAgent::willWriteHTML(unsigned int length, unsigned int startLine)
{
pushCurrentRecord(TimelineRecordFactory::createParseHTMLData(length, startLine), TimelineRecordType::ParseHTML, true);
Modified: trunk/Source/WebCore/inspector/InspectorTimelineAgent.h (118350 => 118351)
--- trunk/Source/WebCore/inspector/InspectorTimelineAgent.h 2012-05-24 11:33:08 UTC (rev 118350)
+++ trunk/Source/WebCore/inspector/InspectorTimelineAgent.h 2012-05-24 11:44:58 UTC (rev 118351)
@@ -99,6 +99,9 @@
void willPaint(const LayoutRect&);
void didPaint();
+ void willComposite();
+ void didComposite();
+
// FIXME: |length| should be passed in didWrite instead willWrite
// as the parser can not know how much it will process until it tries.
void willWriteHTML(unsigned int length, unsigned int startLine);
Modified: trunk/Source/WebCore/inspector/front-end/TimelineModel.js (118350 => 118351)
--- trunk/Source/WebCore/inspector/front-end/TimelineModel.js 2012-05-24 11:33:08 UTC (rev 118350)
+++ trunk/Source/WebCore/inspector/front-end/TimelineModel.js 2012-05-24 11:44:58 UTC (rev 118351)
@@ -50,6 +50,7 @@
Layout: "Layout",
RecalculateStyles: "RecalculateStyles",
Paint: "Paint",
+ CompositeLayers: "CompositeLayers",
ParseHTML: "ParseHTML",
Modified: trunk/Source/WebCore/inspector/front-end/TimelinePresentationModel.js (118350 => 118351)
--- trunk/Source/WebCore/inspector/front-end/TimelinePresentationModel.js 2012-05-24 11:33:08 UTC (rev 118350)
+++ trunk/Source/WebCore/inspector/front-end/TimelinePresentationModel.js 2012-05-24 11:44:58 UTC (rev 118351)
@@ -68,10 +68,11 @@
var recordStyles = {};
recordStyles[recordTypes.Root] = { title: "#root", category: categories["loading"] };
recordStyles[recordTypes.EventDispatch] = { title: WebInspector.UIString("Event"), category: categories["scripting"] };
+ recordStyles[recordTypes.BeginFrame] = { title: WebInspector.UIString("Frame Start"), category: categories["rendering"] };
recordStyles[recordTypes.Layout] = { title: WebInspector.UIString("Layout"), category: categories["rendering"] };
recordStyles[recordTypes.RecalculateStyles] = { title: WebInspector.UIString("Recalculate Style"), category: categories["rendering"] };
recordStyles[recordTypes.Paint] = { title: WebInspector.UIString("Paint"), category: categories["rendering"] };
- recordStyles[recordTypes.BeginFrame] = { title: WebInspector.UIString("Frame Start"), category: categories["rendering"] };
+ recordStyles[recordTypes.CompositeLayers] = { title: WebInspector.UIString("Composite Layers"), category: categories["rendering"] };
recordStyles[recordTypes.ParseHTML] = { title: WebInspector.UIString("Parse"), category: categories["loading"] };
recordStyles[recordTypes.TimerInstall] = { title: WebInspector.UIString("Install Timer"), category: categories["scripting"] };
recordStyles[recordTypes.TimerRemove] = { title: WebInspector.UIString("Remove Timer"), category: categories["scripting"] };