| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010, Google Inc. All rights reserved. | 2 * Copyright (c) 2010, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 } | 665 } |
| 666 | 666 |
| 667 bool DrawingBuffer::resizeMultisampleFramebuffer(const IntSize& size) | 667 bool DrawingBuffer::resizeMultisampleFramebuffer(const IntSize& size) |
| 668 { | 668 { |
| 669 if (m_antiAliasingMode == MSAAExplicitResolve) { | 669 if (m_antiAliasingMode == MSAAExplicitResolve) { |
| 670 m_gl->BindFramebuffer(GL_FRAMEBUFFER, m_multisampleFBO); | 670 m_gl->BindFramebuffer(GL_FRAMEBUFFER, m_multisampleFBO); |
| 671 | 671 |
| 672 m_gl->BindRenderbuffer(GL_RENDERBUFFER, m_multisampleColorBuffer); | 672 m_gl->BindRenderbuffer(GL_RENDERBUFFER, m_multisampleColorBuffer); |
| 673 m_gl->RenderbufferStorageMultisampleCHROMIUM(GL_RENDERBUFFER, m_sampleCo
unt, m_colorBuffer.parameters.internalRenderbufferFormat, size.width(), size.hei
ght()); | 673 m_gl->RenderbufferStorageMultisampleCHROMIUM(GL_RENDERBUFFER, m_sampleCo
unt, m_colorBuffer.parameters.internalRenderbufferFormat, size.width(), size.hei
ght()); |
| 674 | 674 |
| 675 if (m_context->getError() == GL_OUT_OF_MEMORY) | 675 if (m_gl->GetError() == GL_OUT_OF_MEMORY) |
| 676 return false; | 676 return false; |
| 677 | 677 |
| 678 m_gl->FramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_R
ENDERBUFFER, m_multisampleColorBuffer); | 678 m_gl->FramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_R
ENDERBUFFER, m_multisampleColorBuffer); |
| 679 resizeDepthStencil(size); | 679 resizeDepthStencil(size); |
| 680 if (m_gl->CheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPL
ETE) | 680 if (m_gl->CheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPL
ETE) |
| 681 return false; | 681 return false; |
| 682 } | 682 } |
| 683 | 683 |
| 684 return true; | 684 return true; |
| 685 } | 685 } |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1036 | 1036 |
| 1037 if (m_antiAliasingMode == MSAAImplicitResolve) | 1037 if (m_antiAliasingMode == MSAAImplicitResolve) |
| 1038 m_gl->FramebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER, GL_COLOR_ATTACH
MENT0, target, m_colorBuffer.textureId, 0, m_sampleCount); | 1038 m_gl->FramebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER, GL_COLOR_ATTACH
MENT0, target, m_colorBuffer.textureId, 0, m_sampleCount); |
| 1039 else | 1039 else |
| 1040 m_gl->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, target,
m_colorBuffer.textureId, 0); | 1040 m_gl->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, target,
m_colorBuffer.textureId, 0); |
| 1041 | 1041 |
| 1042 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding); | 1042 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding); |
| 1043 } | 1043 } |
| 1044 | 1044 |
| 1045 } // namespace blink | 1045 } // namespace blink |
| OLD | NEW |