| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 76 |
| 77 private: | 77 private: |
| 78 GraphicsContext3D* m_context; | 78 GraphicsContext3D* m_context; |
| 79 GC3Denum m_oldActiveTextureUnit; | 79 GC3Denum m_oldActiveTextureUnit; |
| 80 Platform3DObject m_oldTextureUnitZeroId; | 80 Platform3DObject m_oldTextureUnitZeroId; |
| 81 }; | 81 }; |
| 82 | 82 |
| 83 PassRefPtr<DrawingBuffer> DrawingBuffer::create(GraphicsContext3D* context, cons
t IntSize& size, PreserveDrawingBuffer preserve, PassRefPtr<ContextEvictionManag
er> contextEvictionManager) | 83 PassRefPtr<DrawingBuffer> DrawingBuffer::create(GraphicsContext3D* context, cons
t IntSize& size, PreserveDrawingBuffer preserve, PassRefPtr<ContextEvictionManag
er> contextEvictionManager) |
| 84 { | 84 { |
| 85 Extensions3D* extensions = context->getExtensions(); | 85 Extensions3D* extensions = context->getExtensions(); |
| 86 bool multisampleSupported = extensions->maySupportMultisampling() | 86 bool multisampleSupported = extensions->supports("GL_ANGLE_framebuffer_blit"
) |
| 87 && extensions->supports("GL_ANGLE_framebuffer_blit") | |
| 88 && extensions->supports("GL_ANGLE_framebuffer_multisample") | 87 && extensions->supports("GL_ANGLE_framebuffer_multisample") |
| 89 && extensions->supports("GL_OES_rgb8_rgba8"); | 88 && extensions->supports("GL_OES_rgb8_rgba8"); |
| 90 if (multisampleSupported) { | 89 if (multisampleSupported) { |
| 91 extensions->ensureEnabled("GL_ANGLE_framebuffer_blit"); | 90 extensions->ensureEnabled("GL_ANGLE_framebuffer_blit"); |
| 92 extensions->ensureEnabled("GL_ANGLE_framebuffer_multisample"); | 91 extensions->ensureEnabled("GL_ANGLE_framebuffer_multisample"); |
| 93 extensions->ensureEnabled("GL_OES_rgb8_rgba8"); | 92 extensions->ensureEnabled("GL_OES_rgb8_rgba8"); |
| 94 } | 93 } |
| 95 bool packedDepthStencilSupported = extensions->supports("GL_OES_packed_depth
_stencil"); | 94 bool packedDepthStencilSupported = extensions->supports("GL_OES_packed_depth
_stencil"); |
| 96 if (packedDepthStencilSupported) | 95 if (packedDepthStencilSupported) |
| 97 extensions->ensureEnabled("GL_OES_packed_depth_stencil"); | 96 extensions->ensureEnabled("GL_OES_packed_depth_stencil"); |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 | 817 |
| 819 void DrawingBuffer::bind() | 818 void DrawingBuffer::bind() |
| 820 { | 819 { |
| 821 if (!m_context) | 820 if (!m_context) |
| 822 return; | 821 return; |
| 823 | 822 |
| 824 m_context->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_multisampleFBO
? m_multisampleFBO : m_fbo); | 823 m_context->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_multisampleFBO
? m_multisampleFBO : m_fbo); |
| 825 } | 824 } |
| 826 | 825 |
| 827 } // namespace WebCore | 826 } // namespace WebCore |
| OLD | NEW |