|
|
Remove WebGLObject maps from WebGLRenderingContextBase and WebGLContextGroup.
There are two high-level goals for the handling of WebGLObjects:
1) When they are GC'd, the underlying graphics resource is deleted
promptly.
2) When the context is destroyed, all of the underlying graphics
resources are reclaimed.
The WebGLContextObject and WebGLSharedObject maps were an attempt to
implement (2) before WebGL contexts were in their own client-side
share group, separate from the compositor. Unfortunately, with the
introduction of Oilpan, it's become clear that there are longstanding
bugs in the lifetime management of WebGLObjects. These bugs recently
began manifesting frequently on the bots.
To fix these bugs, WebGLObjects are now eagerly finalized, rather than
the WebGLRenderingContextBase. WebGLObjects maintain a strong
reference either to their context or share group, depending on whether
they're per-context or shared objects. WebGLContextGroup becomes an
Oilpan object which maintains weak references to all of its contexts
(currently, just one). WebGLRenderingContextBase maintains a strong
reference to its context group.
Because WebGLObjects can no longer be enumerated, their invalidation
during context loss needs to be rewritten. This is handled by tracking
the number of context losses on a per-share-group basis, and comparing
this with a cached version in each WebGLObject instance during its
validation.
As a consequence of this change, most of the work in
WebGLRenderingContextBase's destructor, as well as in the destructors
of corollary types like WebGLExtension, becomes useless, and it has
been removed. The destructors of the WebGLObject subclasses have been
made more uniform to prevent errors.
More fixes around wrapper tracing are probably both needed and enabled
by this CL, but they can follow this necessary fix.
BUG= 537054, 666061
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
TBR=zmo@chromium.org
Committed: https://crrev.com/f5e91b15573820ff14396b6be246c54ca6755a13
Cr-Commit-Position: refs/heads/master@{#436080}
Total comments: 11
Total comments: 18
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+243 lines, -430 lines) |
Patch |
 |
M |
third_party/WebKit/Source/modules/webgl/ANGLEInstancedArrays.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/ANGLEInstancedArrays.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/EXTBlendMinMax.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/EXTBlendMinMax.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/EXTColorBufferFloat.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/EXTColorBufferFloat.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQuery.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQuery.cpp
|
View
|
|
2 chunks |
+2 lines, -7 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQueryWebGL2.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQueryWebGL2.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/EXTFragDepth.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/EXTFragDepth.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/EXTShaderTextureLOD.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/EXTShaderTextureLOD.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/EXTTextureFilterAnisotropic.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/EXTTextureFilterAnisotropic.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/EXTsRGB.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/EXTsRGB.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/OESElementIndexUint.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/OESElementIndexUint.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/OESStandardDerivatives.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/OESStandardDerivatives.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/OESTextureFloat.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/OESTextureFloat.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/OESTextureFloatLinear.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/OESTextureFloatLinear.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/OESTextureHalfFloat.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/OESTextureHalfFloat.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/OESTextureHalfFloatLinear.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/OESTextureHalfFloatLinear.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/OESVertexArrayObject.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/OESVertexArrayObject.cpp
|
View
|
|
2 chunks |
+1 line, -5 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGL2RenderingContext.h
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGL2RenderingContext.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.h
|
View
|
|
2 chunks |
+0 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
|
View
|
|
6 chunks |
+5 lines, -30 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLBuffer.cpp
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureASTC.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureASTC.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureATC.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureATC.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureETC.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureETC.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureETC1.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureETC1.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLCompressedTexturePVRTC.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLCompressedTexturePVRTC.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureS3TC.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureS3TC.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureS3TCsRGB.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureS3TCsRGB.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLContextGroup.h
|
View
|
|
2 chunks |
+26 lines, -20 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLContextGroup.cpp
|
View
|
1
|
2 chunks |
+18 lines, -38 lines |
8 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLContextObject.h
|
View
|
1
|
2 chunks |
+3 lines, -7 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLContextObject.cpp
|
View
|
1
|
1 chunk |
+12 lines, -9 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLDebugRendererInfo.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLDebugRendererInfo.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLDebugShaders.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLDebugShaders.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLDepthTexture.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLDepthTexture.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLDrawBuffers.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLDrawBuffers.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLExtension.h
|
View
|
1
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLExtension.cpp
|
View
|
1
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLFenceSync.h
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLFenceSync.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLFramebuffer.h
|
View
|
|
2 chunks |
+1 line, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLFramebuffer.cpp
|
View
|
|
6 chunks |
+2 lines, -13 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLLoseContext.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLLoseContext.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLObject.h
|
View
|
|
4 chunks |
+43 lines, -0 lines |
4 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLObject.cpp
|
View
|
|
4 chunks |
+29 lines, -8 lines |
2 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLProgram.cpp
|
View
|
|
1 chunk |
+10 lines, -16 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLQuery.cpp
|
View
|
|
2 chunks |
+4 lines, -5 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLRenderbuffer.cpp
|
View
|
|
2 chunks |
+4 lines, -5 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.h
|
View
|
|
2 chunks |
+0 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
|
View
|
1
|
7 chunks |
+3 lines, -16 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
View
|
1
|
12 chunks |
+27 lines, -86 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLSampler.cpp
|
View
|
|
2 chunks |
+4 lines, -5 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLShader.cpp
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLSharedObject.h
|
View
|
|
3 chunks |
+10 lines, -9 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLSharedObject.cpp
|
View
|
|
1 chunk |
+21 lines, -12 lines |
4 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLSharedPlatform3DObject.h
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLSharedPlatform3DObject.cpp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLSync.cpp
|
View
|
|
1 chunk |
+4 lines, -5 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLTexture.cpp
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLTimerQueryEXT.cpp
|
View
|
|
2 chunks |
+4 lines, -5 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLTransformFeedback.cpp
|
View
|
|
2 chunks |
+4 lines, -5 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObjectBase.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/webgl/WebGLVertexArrayObjectBase.cpp
|
View
|
|
3 chunks |
+2 lines, -9 lines |
0 comments
|
Download
|
Total messages: 33 (15 generated)
|