2011-04-07 John Bauman <jbauman@chromium.org>

        Reviewed by Kenneth Russell.

        clearIfComposited call is really slow
        https://bugs.webkit.org/show_bug.cgi?id=57999

        Move getContextAttributes call after the if, so it isn't called nearly as often.

        No new tests.

        * html/canvas/WebGLRenderingContext.cpp:
        (WebCore::WebGLRenderingContext::clearIfComposited):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83242 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 16204d14
2011-04-07 John Bauman <jbauman@chromium.org>
Reviewed by Kenneth Russell.
clearIfComposited call is really slow
https://bugs.webkit.org/show_bug.cgi?id=57999
Move getContextAttributes call after the if, so it isn't called nearly as often.
No new tests.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::clearIfComposited):
2011-04-07 Luke Macpherson <macpherson@chromium.org>
Reviewed by Dimitri Glazkov.
......@@ -502,12 +502,12 @@ bool WebGLRenderingContext::clearIfComposited(GC3Dbitfield mask)
if (isContextLost())
return false;
RefPtr<WebGLContextAttributes> contextAttributes = getContextAttributes();
if (!m_context->layerComposited() || m_layerCleared
|| m_attributes.preserveDrawingBuffer || m_framebufferBinding)
return false;
RefPtr<WebGLContextAttributes> contextAttributes = getContextAttributes();
// Determine if it's possible to combine the clear the user asked for and this clear.
bool combinedClear = mask && !m_scissorEnabled;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment