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

Side by Side Diff: Source/core/inspector/InspectorLayerTreeAgent.h

Issue 23050018: DevTools: expose layer compositing reasons and paint count via layer tree agent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixed gcc build Created 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 26 matching lines...) Expand all
37 #include "core/rendering/RenderLayer.h" 37 #include "core/rendering/RenderLayer.h"
38 #include "wtf/PassOwnPtr.h" 38 #include "wtf/PassOwnPtr.h"
39 #include "wtf/PassRefPtr.h" 39 #include "wtf/PassRefPtr.h"
40 #include "wtf/text/WTFString.h" 40 #include "wtf/text/WTFString.h"
41 41
42 namespace WebCore { 42 namespace WebCore {
43 43
44 class InspectorDOMAgent; 44 class InspectorDOMAgent;
45 class InstrumentingAgents; 45 class InstrumentingAgents;
46 class Page; 46 class Page;
47 class RenderLayerCompositor;
47 48
48 typedef String ErrorString; 49 typedef String ErrorString;
49 50
50 class InspectorLayerTreeAgent : public InspectorBaseAgent<InspectorLayerTreeAgen t>, public InspectorBackendDispatcher::LayerTreeCommandHandler { 51 class InspectorLayerTreeAgent : public InspectorBaseAgent<InspectorLayerTreeAgen t>, public InspectorBackendDispatcher::LayerTreeCommandHandler {
51 public: 52 public:
52 static PassOwnPtr<InspectorLayerTreeAgent> create(InstrumentingAgents* instr umentingAgents, InspectorCompositeState* state, InspectorDOMAgent* domAgent, Pag e* page) 53 static PassOwnPtr<InspectorLayerTreeAgent> create(InstrumentingAgents* instr umentingAgents, InspectorCompositeState* state, InspectorDOMAgent* domAgent, Pag e* page)
53 { 54 {
54 return adoptPtr(new InspectorLayerTreeAgent(instrumentingAgents, state, domAgent, page)); 55 return adoptPtr(new InspectorLayerTreeAgent(instrumentingAgents, state, domAgent, page));
55 } 56 }
56 ~InspectorLayerTreeAgent(); 57 ~InspectorLayerTreeAgent();
57 58
58 virtual void setFrontend(InspectorFrontend*); 59 virtual void setFrontend(InspectorFrontend*);
59 virtual void clearFrontend(); 60 virtual void clearFrontend();
60 virtual void restore(); 61 virtual void restore();
61 62
62 void didCommitLoad(Frame*, DocumentLoader*); 63 void didCommitLoad(Frame*, DocumentLoader*);
63 void layerTreeDidChange(); 64 void layerTreeDidChange();
64 65
65 // Called from the front-end. 66 // Called from the front-end.
66 virtual void enable(ErrorString*); 67 virtual void enable(ErrorString*);
67 virtual void disable(ErrorString*); 68 virtual void disable(ErrorString*);
68 virtual void getLayers(ErrorString*, const int* nodeId, RefPtr<TypeBuilder:: Array<TypeBuilder::LayerTree::Layer> >&); 69 virtual void getLayers(ErrorString*, const int* nodeId, RefPtr<TypeBuilder:: Array<TypeBuilder::LayerTree::Layer> >&);
70 virtual void compositingReasons(ErrorString*, const String& layerId, RefPtr< TypeBuilder::Array<String> >&);
69 71
70 private: 72 private:
71 InspectorLayerTreeAgent(InstrumentingAgents*, InspectorCompositeState*, Insp ectorDOMAgent*, Page*); 73 InspectorLayerTreeAgent(InstrumentingAgents*, InspectorCompositeState*, Insp ectorDOMAgent*, Page*);
72 74
75 RenderLayerCompositor* renderLayerCompositor(ErrorString*);
76 GraphicsLayer* layerById(ErrorString*, const String& layerId);
77 int idForNode(ErrorString*, Node*);
78
73 void gatherLayersUsingRenderObjectHierarchy(ErrorString*, RenderObject*, Ref Ptr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer> >&); 79 void gatherLayersUsingRenderObjectHierarchy(ErrorString*, RenderObject*, Ref Ptr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer> >&);
74 void gatherLayersUsingRenderLayerHierarchy(ErrorString*, RenderLayer*, RefPt r<TypeBuilder::Array<TypeBuilder::LayerTree::Layer> >&); 80 void gatherLayersUsingRenderLayerHierarchy(ErrorString*, RenderLayer*, RefPt r<TypeBuilder::Array<TypeBuilder::LayerTree::Layer> >&);
75 void gatherLayersUsingGraphicsLayerHierarchy(ErrorString*, GraphicsLayer*, R efPtr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer> >&); 81 void gatherLayersUsingGraphicsLayerHierarchy(ErrorString*, GraphicsLayer*, R efPtr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer> >&);
76 void addRenderLayerBacking(ErrorString*, RenderLayerBacking*, Node*, RefPtr< TypeBuilder::Array<TypeBuilder::LayerTree::Layer> >&); 82 void addRenderLayerBacking(ErrorString*, RenderLayerBacking*, Node*, RefPtr< TypeBuilder::Array<TypeBuilder::LayerTree::Layer> >&);
77 83
78 int idForNode(ErrorString*, Node*);
79
80 InspectorFrontend::LayerTree* m_frontend; 84 InspectorFrontend::LayerTree* m_frontend;
81 Page* m_page; 85 Page* m_page;
82 InspectorDOMAgent* m_domAgent; 86 InspectorDOMAgent* m_domAgent;
83 87
84 HashMap<const RenderLayer*, String> m_documentLayerToIdMap; 88 HashMap<const RenderLayer*, String> m_documentLayerToIdMap;
85 }; 89 };
86 90
87 } // namespace WebCore 91 } // namespace WebCore
88 92
89 93
90 #endif // !defined(InspectorLayerTreeAgent_h) 94 #endif // !defined(InspectorLayerTreeAgent_h)
OLDNEW
« no previous file with comments | « LayoutTests/inspector/resources/composited-iframe.html ('k') | Source/core/inspector/InspectorLayerTreeAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698