Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(583)

Side by Side Diff: Source/core/inspector/InspectorTraceEvents.cpp

Issue 565793003: [Invalidation Tracking] Add trace events for compositor based invalidations (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: use cmacro Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/inspector/InspectorTraceEvents.h" 6 #include "core/inspector/InspectorTraceEvents.h"
7 7
8 #include "bindings/core/v8/ScriptCallStackFactory.h" 8 #include "bindings/core/v8/ScriptCallStackFactory.h"
9 #include "bindings/core/v8/ScriptGCEvent.h" 9 #include "bindings/core/v8/ScriptGCEvent.h"
10 #include "bindings/core/v8/ScriptSourceCode.h" 10 #include "bindings/core/v8/ScriptSourceCode.h"
11 #include "core/events/Event.h" 11 #include "core/events/Event.h"
12 #include "core/frame/FrameView.h" 12 #include "core/frame/FrameView.h"
13 #include "core/frame/LocalFrame.h" 13 #include "core/frame/LocalFrame.h"
14 #include "core/inspector/IdentifiersFactory.h" 14 #include "core/inspector/IdentifiersFactory.h"
15 #include "core/inspector/InspectorNodeIds.h" 15 #include "core/inspector/InspectorNodeIds.h"
16 #include "core/inspector/ScriptCallStack.h" 16 #include "core/inspector/ScriptCallStack.h"
17 #include "core/page/Page.h" 17 #include "core/page/Page.h"
18 #include "core/rendering/RenderImage.h" 18 #include "core/rendering/RenderImage.h"
19 #include "core/rendering/RenderLayer.h"
19 #include "core/rendering/RenderObject.h" 20 #include "core/rendering/RenderObject.h"
20 #include "core/workers/WorkerThread.h" 21 #include "core/workers/WorkerThread.h"
21 #include "core/xml/XMLHttpRequest.h" 22 #include "core/xml/XMLHttpRequest.h"
22 #include "platform/JSONValues.h" 23 #include "platform/JSONValues.h"
23 #include "platform/TracedValue.h" 24 #include "platform/TracedValue.h"
24 #include "platform/graphics/GraphicsLayer.h" 25 #include "platform/graphics/GraphicsLayer.h"
25 #include "platform/network/ResourceRequest.h" 26 #include "platform/network/ResourceRequest.h"
26 #include "platform/network/ResourceResponse.h" 27 #include "platform/network/ResourceResponse.h"
27 #include "platform/weborigin/KURL.h" 28 #include "platform/weborigin/KURL.h"
28 #include "wtf/Vector.h" 29 #include "wtf/Vector.h"
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 { 251 {
251 LocalFrame* frame = renderer.frame(); 252 LocalFrame* frame = renderer.frame();
252 FrameView* view = frame->view(); 253 FrameView* view = frame->view();
253 FloatQuad absolute = renderer.localToAbsoluteQuad(FloatQuad(rect)); 254 FloatQuad absolute = renderer.localToAbsoluteQuad(FloatQuad(rect));
254 quad->setP1(view->contentsToRootView(roundedIntPoint(absolute.p1()))); 255 quad->setP1(view->contentsToRootView(roundedIntPoint(absolute.p1())));
255 quad->setP2(view->contentsToRootView(roundedIntPoint(absolute.p2()))); 256 quad->setP2(view->contentsToRootView(roundedIntPoint(absolute.p2())));
256 quad->setP3(view->contentsToRootView(roundedIntPoint(absolute.p3()))); 257 quad->setP3(view->contentsToRootView(roundedIntPoint(absolute.p3())));
257 quad->setP4(view->contentsToRootView(roundedIntPoint(absolute.p4()))); 258 quad->setP4(view->contentsToRootView(roundedIntPoint(absolute.p4())));
258 } 259 }
259 260
261 const char InspectorLayerInvalidationTrackingEvent::SquashingLayerGeometryWasUpd ated[] = "Squashing layer geometry was updated.";
262 const char InspectorLayerInvalidationTrackingEvent::AddedToSquashingLayer[] = "T he layer may have been added to an already-existing squashing layer.";
263 const char InspectorLayerInvalidationTrackingEvent::RemovedFromSquashingLayer[] = "Removed the layer from a squashing layer.";
264 const char InspectorLayerInvalidationTrackingEvent::ReflectionLayerChanged[] = " Reflection layer change.";
265 const char InspectorLayerInvalidationTrackingEvent::NewCompositedLayer[] = "Assi gned a new composited layer.";
266 const char InspectorLayerInvalidationTrackingEvent::AncestorRequiresNewLayer[] = "A new composited layer is needed based on the RenderLayer's compositing ancest or's properties.";
267
268 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorLayerInvalidationTrack ingEvent::data(const RenderLayer* layer, const char* reason)
269 {
270 const RenderObject* paintInvalidationContainer = layer->renderer()->containe rForPaintInvalidation();
271
272 RefPtr<TracedValue> value = TracedValue::create();
273 value->setString("frame", toHexString(paintInvalidationContainer->frame()));
274 setGeneratingNodeId(value.get(), "paintId", paintInvalidationContainer);
275 value->setString("reason", reason);
276 return value;
277 }
278
260 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorPaintEvent::data(Rende rObject* renderer, const LayoutRect& clipRect, const GraphicsLayer* graphicsLaye r) 279 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorPaintEvent::data(Rende rObject* renderer, const LayoutRect& clipRect, const GraphicsLayer* graphicsLaye r)
261 { 280 {
262 RefPtr<TracedValue> value = TracedValue::create(); 281 RefPtr<TracedValue> value = TracedValue::create();
263 value->setString("frame", toHexString(renderer->frame())); 282 value->setString("frame", toHexString(renderer->frame()));
264 FloatQuad quad; 283 FloatQuad quad;
265 localToPageQuad(*renderer, clipRect, &quad); 284 localToPageQuad(*renderer, clipRect, &quad);
266 createQuad(value.get(), "clip", quad); 285 createQuad(value.get(), "clip", quad);
267 setGeneratingNodeId(value.get(), "nodeId", renderer); 286 setGeneratingNodeId(value.get(), "nodeId", renderer);
268 int graphicsLayerId = graphicsLayer ? graphicsLayer->platformLayer()->id() : 0; 287 int graphicsLayerId = graphicsLayer ? graphicsLayer->platformLayer()->id() : 0;
269 value->setInteger("layerId", graphicsLayerId); 288 value->setInteger("layerId", graphicsLayerId);
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 377
359 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorTracingSessionIdForWor kerEvent::data(const String& sessionId, WorkerThread* workerThread) 378 PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorTracingSessionIdForWor kerEvent::data(const String& sessionId, WorkerThread* workerThread)
360 { 379 {
361 RefPtr<TracedValue> value = TracedValue::create(); 380 RefPtr<TracedValue> value = TracedValue::create();
362 value->setString("sessionId", sessionId); 381 value->setString("sessionId", sessionId);
363 value->setDouble("workerThreadId", workerThread->platformThreadId()); 382 value->setDouble("workerThreadId", workerThread->platformThreadId());
364 return value; 383 return value;
365 } 384 }
366 385
367 } 386 }
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorTraceEvents.h ('k') | Source/core/rendering/compositing/CompositedLayerMapping.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698