Web Inspector: Canvas: lazily create the agent
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Mar 2019 08:41:25 +0000 (08:41 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Mar 2019 08:41:25 +0000 (08:41 +0000)
commit54825b3c6026f74e615cb55d7e7f45b9d44475d7
tree72568b4e1ceba691f8a9d9ff991e1cd692ab7bee
parent27c74e235c5e9417bb04651b221af6016dd76692
Web Inspector: Canvas: lazily create the agent
https://bugs.webkit.org/show_bug.cgi?id=195241

Reviewed by Joseph Pecoraro.

No functionality change.

* html/canvas/CanvasRenderingContext.h:
* html/canvas/CanvasRenderingContext.cpp:
(WebCore::CanvasRenderingContext::instances): Added.
(WebCore::CanvasRenderingContext::instancesMutex): Added.
(WebCore::CanvasRenderingContext::CanvasRenderingContext):
(WebCore::CanvasRenderingContext::~CanvasRenderingContext):

* html/canvas/WebGLProgram.h:
* html/canvas/WebGLProgram.cpp:
(WebCore::WebGLProgram::instances): Added.
(WebCore::WebGLProgram::instancesMutex): Added.
(WebCore::WebGLProgram::WebGLProgram):
(WebCore::WebGLProgram::~WebGLProgram):
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::~WebGLRenderingContextBase):

* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::createLazyAgents):

* inspector/agents/InspectorCanvasAgent.h:
* inspector/agents/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::enable):
(WebCore::InspectorCanvasAgent::disable):
(WebCore::InspectorCanvasAgent::frameNavigated):
(WebCore::InspectorCanvasAgent::didCreateCanvasRenderingContext):
(WebCore::InspectorCanvasAgent::canvasDestroyed):
(WebCore::InspectorCanvasAgent::didCreateProgram):
(WebCore::InspectorCanvasAgent::willDeleteProgram):
(WebCore::InspectorCanvasAgent::bindCanvas): Added.
(WebCore::InspectorCanvasAgent::canvasDestroyedTimerFired):

* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didCreateCanvasRenderingContext):
(WebCore::InspectorInstrumentation::didCreateProgram):
(WebCore::InspectorInstrumentation::willDeleteProgram):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242594 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/canvas/CanvasRenderingContext.cpp
Source/WebCore/html/canvas/CanvasRenderingContext.h
Source/WebCore/html/canvas/WebGLProgram.cpp
Source/WebCore/html/canvas/WebGLProgram.h
Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
Source/WebCore/inspector/InspectorController.cpp
Source/WebCore/inspector/InspectorInstrumentation.h
Source/WebCore/inspector/agents/InspectorCanvasAgent.cpp
Source/WebCore/inspector/agents/InspectorCanvasAgent.h