| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 m_context->deleteRenderbuffer(m_depthBuffer); | 77 m_context->deleteRenderbuffer(m_depthBuffer); |
| 78 m_depthBuffer = 0; | 78 m_depthBuffer = 0; |
| 79 } | 79 } |
| 80 | 80 |
| 81 if (m_stencilBuffer) { | 81 if (m_stencilBuffer) { |
| 82 m_context->deleteRenderbuffer(m_stencilBuffer); | 82 m_context->deleteRenderbuffer(m_stencilBuffer); |
| 83 m_stencilBuffer = 0; | 83 m_stencilBuffer = 0; |
| 84 } | 84 } |
| 85 | 85 |
| 86 if (m_multisampleFBO) { | 86 if (m_multisampleFBO) { |
| 87 m_context->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_multisample
FBO); | |
| 88 m_context->deleteFramebuffer(m_multisampleFBO); | 87 m_context->deleteFramebuffer(m_multisampleFBO); |
| 89 m_multisampleFBO = 0; | 88 m_multisampleFBO = 0; |
| 90 } | 89 } |
| 91 | 90 |
| 92 m_context->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_fbo); | |
| 93 m_context->deleteFramebuffer(m_fbo); | 91 m_context->deleteFramebuffer(m_fbo); |
| 94 m_fbo = 0; | 92 m_fbo = 0; |
| 95 } | 93 } |
| 96 | 94 |
| 97 void DrawingBuffer::createSecondaryBuffers() | 95 void DrawingBuffer::createSecondaryBuffers() |
| 98 { | 96 { |
| 99 // create a multisample FBO | 97 // create a multisample FBO |
| 100 if (multisample()) { | 98 if (multisample()) { |
| 101 m_multisampleFBO = m_context->createFramebuffer(); | 99 m_multisampleFBO = m_context->createFramebuffer(); |
| 102 m_context->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_multisample
FBO); | 100 m_context->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_multisample
FBO); |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 if (!m_context) | 290 if (!m_context) |
| 293 return; | 291 return; |
| 294 | 292 |
| 295 m_context->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_multisampleFBO
? m_multisampleFBO : m_fbo); | 293 m_context->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_multisampleFBO
? m_multisampleFBO : m_fbo); |
| 296 m_context->viewport(0, 0, m_size.width(), m_size.height()); | 294 m_context->viewport(0, 0, m_size.width(), m_size.height()); |
| 297 } | 295 } |
| 298 | 296 |
| 299 } // namespace WebCore | 297 } // namespace WebCore |
| 300 | 298 |
| 301 #endif | 299 #endif |
| OLD | NEW |