diff options
author | Zhenyao Mo <zmo@google.com> | 2011-06-30 23:24:26 +0000 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2013-01-20 18:38:32 -0800 |
commit | 4da5f26c019971a319dda77e4bfe6480c269bdf1 (patch) | |
tree | 2ccf19cbab0dddbd80f45d3397526a571ce5b0d3 /Source/WebCore/html/canvas/WebGLRenderingContext.h | |
parent | c018655c37a1da5d7e1f9dc94d0467130cf630f1 (diff) | |
download | external_webkit-4da5f26c019971a319dda77e4bfe6480c269bdf1.zip external_webkit-4da5f26c019971a319dda77e4bfe6480c269bdf1.tar.gz external_webkit-4da5f26c019971a319dda77e4bfe6480c269bdf1.tar.bz2 |
Improve WebGL object lifetime management in WebGLRenderingContext
2011-06-30 Zhenyao Mo <zmo@google.com>
Reviewed by Kenneth Russell.
Improve WebGL object lifetime management in WebGLRenderingContext
https://bugs.webkit.org/show_bug.cgi?id=63635
* fast/canvas/webgl/gl-object-get-calls-expected.txt:
* fast/canvas/webgl/gl-object-get-calls.html: Fix a bug so getFramebufferAtatchmentParameter generates an error if nothing is attached and something other than TYPE is queried.
* fast/canvas/webgl/object-deletion-behaviour-expected.txt:
* fast/canvas/webgl/object-deletion-behaviour.html: Ditto.
* fast/canvas/webgl/program-test.html: Fix the test so the order of shaders returned by getAttachedShaders doesn't matter.
2011-06-30 Zhenyao Mo <zmo@google.com>
Reviewed by Kenneth Russell.
Improve WebGL object lifetime management in WebGLRenderingContext
https://bugs.webkit.org/show_bug.cgi?id=63635
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getAttachedShaders): Use cached objects instead of querying the underlying GL.
(WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter): Ditto.
(WebCore::WebGLRenderingContext::detachAndRemoveAllObjects): Multiple loop because objects might be removed from the table within an iteration.
* html/canvas/WebGLRenderingContext.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@90180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CRs-fixed: 407009
(cherry-picked from commit 2dbba5d5facb2c0c57a37eb0cf3958bae0f697fa)
Change-Id: I2cb88cc5790452c18f6e58420cc7b063c9ffce26
Diffstat (limited to 'Source/WebCore/html/canvas/WebGLRenderingContext.h')
-rw-r--r-- | Source/WebCore/html/canvas/WebGLRenderingContext.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Source/WebCore/html/canvas/WebGLRenderingContext.h b/Source/WebCore/html/canvas/WebGLRenderingContext.h index c4a167f..2a0a90d 100644 --- a/Source/WebCore/html/canvas/WebGLRenderingContext.h +++ b/Source/WebCore/html/canvas/WebGLRenderingContext.h @@ -329,10 +329,6 @@ public: void addObject(WebGLObject*); void detachAndRemoveAllObjects(); - WebGLTexture* findTexture(Platform3DObject); - WebGLRenderbuffer* findRenderbuffer(Platform3DObject); - WebGLBuffer* findBuffer(Platform3DObject); - WebGLShader* findShader(Platform3DObject); void markContextChanged(); void cleanupAfterGraphicsCall(bool changed) @@ -388,7 +384,7 @@ public: bool m_needsUpdate; bool m_markedCanvasDirty; - HashSet<RefPtr<WebGLObject> > m_canvasObjects; + HashSet<WebGLObject*> m_canvasObjects; // List of bound VBO's. Used to maintain info about sizes for ARRAY_BUFFER and stored values for ELEMENT_ARRAY_BUFFER RefPtr<WebGLBuffer> m_boundArrayBuffer; |