diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-23 03:57:08 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-23 03:57:08 +0000 |
commit | e01dddb11b56d56beeaeadc1fdb300419f50c2e3 (patch) | |
tree | 7a64acffd2ba01fbd8ae1d59579145f4ca78d5fd /cc/gl_renderer.cc | |
parent | 62885abfdaced9bad3f119e5f4f15b81f34c02c6 (diff) | |
download | chromium_src-e01dddb11b56d56beeaeadc1fdb300419f50c2e3.zip chromium_src-e01dddb11b56d56beeaeadc1fdb300419f50c2e3.tar.gz chromium_src-e01dddb11b56d56beeaeadc1fdb300419f50c2e3.tar.bz2 |
cc: Unify context losing machinery
The lost context callback is only used in the thread proxy, and it
ends up calling all the way into the scheduler, which can cause some
weird re-entrancy. Instead, post a task to check for the lost context
both in the single and threaded proxy classes.
Tested by cc_unittests:LayerTreeHostContextTest* unit tests.
I beefed up the tests some to also test losing the context during
draw.
BUG=123444
Review URL: https://chromiumcodereview.appspot.com/11606012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178239 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/gl_renderer.cc')
-rw-r--r-- | cc/gl_renderer.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cc/gl_renderer.cc b/cc/gl_renderer.cc index 219d60f..de6cfc1 100644 --- a/cc/gl_renderer.cc +++ b/cc/gl_renderer.cc @@ -643,7 +643,7 @@ void GLRenderer::drawRenderPassQuad(DrawingFrame& frame, const RenderPassDrawQua GLC(context(), context()->uniform2f(shaderTexScaleLocation, tex_scale_x, tex_scale_y)); } else { - NOTREACHED(); + DCHECK(isContextLost()); } if (shaderMaskSamplerLocation != -1) { @@ -1513,7 +1513,7 @@ bool GLRenderer::bindFramebufferToTexture(DrawingFrame& frame, const ScopedResou unsigned textureId = m_currentFramebufferLock->textureId(); GLC(m_context, m_context->framebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, textureId, 0)); - DCHECK(m_context->checkFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE); + DCHECK(m_context->checkFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE || isContextLost()); initializeMatrices(frame, framebufferRect, false); setDrawViewportSize(framebufferRect.size()); |