| OLD | NEW | 
|---|
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "cc/gl_renderer.h" | 5 #include "cc/gl_renderer.h" | 
| 6 | 6 | 
| 7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" | 
| 8 #include "base/logging.h" | 8 #include "base/logging.h" | 
| 9 #include "base/string_split.h" | 9 #include "base/string_split.h" | 
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" | 
| (...skipping 1492 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1503 | 1503 | 
| 1504 bool GLRenderer::bindFramebufferToTexture(DrawingFrame& frame, const ScopedResou
      rce* texture, const gfx::Rect& framebufferRect) | 1504 bool GLRenderer::bindFramebufferToTexture(DrawingFrame& frame, const ScopedResou
      rce* texture, const gfx::Rect& framebufferRect) | 
| 1505 { | 1505 { | 
| 1506     DCHECK(texture->id()); | 1506     DCHECK(texture->id()); | 
| 1507 | 1507 | 
| 1508     GLC(m_context, m_context->bindFramebuffer(GL_FRAMEBUFFER, m_offscreenFramebu
      fferId)); | 1508     GLC(m_context, m_context->bindFramebuffer(GL_FRAMEBUFFER, m_offscreenFramebu
      fferId)); | 
| 1509     m_currentFramebufferLock = make_scoped_ptr(new ResourceProvider::ScopedWrite
      LockGL(m_resourceProvider, texture->id())); | 1509     m_currentFramebufferLock = make_scoped_ptr(new ResourceProvider::ScopedWrite
      LockGL(m_resourceProvider, texture->id())); | 
| 1510     unsigned textureId = m_currentFramebufferLock->textureId(); | 1510     unsigned textureId = m_currentFramebufferLock->textureId(); | 
| 1511     GLC(m_context, m_context->framebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTA
      CHMENT0, GL_TEXTURE_2D, textureId, 0)); | 1511     GLC(m_context, m_context->framebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTA
      CHMENT0, GL_TEXTURE_2D, textureId, 0)); | 
| 1512 | 1512 | 
| 1513     DCHECK(m_context->checkFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_C
      OMPLETE); | 1513     DCHECK(m_context->checkFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_C
      OMPLETE || isContextLost()); | 
| 1514 | 1514 | 
| 1515     initializeMatrices(frame, framebufferRect, false); | 1515     initializeMatrices(frame, framebufferRect, false); | 
| 1516     setDrawViewportSize(framebufferRect.size()); | 1516     setDrawViewportSize(framebufferRect.size()); | 
| 1517 | 1517 | 
| 1518     return true; | 1518     return true; | 
| 1519 } | 1519 } | 
| 1520 | 1520 | 
| 1521 void GLRenderer::setScissorTestRect(const gfx::Rect& scissorRect) | 1521 void GLRenderer::setScissorTestRect(const gfx::Rect& scissorRect) | 
| 1522 { | 1522 { | 
| 1523     ensureScissorTestEnabled(); | 1523     ensureScissorTestEnabled(); | 
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1796 | 1796 | 
| 1797     releaseRenderPassTextures(); | 1797     releaseRenderPassTextures(); | 
| 1798 } | 1798 } | 
| 1799 | 1799 | 
| 1800 bool GLRenderer::isContextLost() | 1800 bool GLRenderer::isContextLost() | 
| 1801 { | 1801 { | 
| 1802     return (m_context->getGraphicsResetStatusARB() != GL_NO_ERROR); | 1802     return (m_context->getGraphicsResetStatusARB() != GL_NO_ERROR); | 
| 1803 } | 1803 } | 
| 1804 | 1804 | 
| 1805 }  // namespace cc | 1805 }  // namespace cc | 
| OLD | NEW | 
|---|