| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 extensionsUtil->ensureExtensionEnabled("GL_OES_rgb8_rgba8"); | 103 extensionsUtil->ensureExtensionEnabled("GL_OES_rgb8_rgba8"); |
| 104 if (extensionsUtil->supportsExtension("GL_CHROMIUM_framebuffer_multisamp
le")) | 104 if (extensionsUtil->supportsExtension("GL_CHROMIUM_framebuffer_multisamp
le")) |
| 105 extensionsUtil->ensureExtensionEnabled("GL_CHROMIUM_framebuffer_mult
isample"); | 105 extensionsUtil->ensureExtensionEnabled("GL_CHROMIUM_framebuffer_mult
isample"); |
| 106 else | 106 else |
| 107 extensionsUtil->ensureExtensionEnabled("GL_EXT_multisampled_render_t
o_texture"); | 107 extensionsUtil->ensureExtensionEnabled("GL_EXT_multisampled_render_t
o_texture"); |
| 108 } | 108 } |
| 109 bool discardFramebufferSupported = extensionsUtil->supportsExtension("GL_EXT
_discard_framebuffer"); | 109 bool discardFramebufferSupported = extensionsUtil->supportsExtension("GL_EXT
_discard_framebuffer"); |
| 110 if (discardFramebufferSupported) | 110 if (discardFramebufferSupported) |
| 111 extensionsUtil->ensureExtensionEnabled("GL_EXT_discard_framebuffer"); | 111 extensionsUtil->ensureExtensionEnabled("GL_EXT_discard_framebuffer"); |
| 112 | 112 |
| 113 RefPtr<DrawingBuffer> drawingBuffer = adoptRef(new DrawingBuffer(std::move(c
ontextProvider), extensionsUtil.release(), discardFramebufferSupported, wantAlph
aChannel, premultipliedAlpha, preserve, wantDepthBuffer, wantStencilBuffer)); | 113 RefPtr<DrawingBuffer> drawingBuffer = adoptRef(new DrawingBuffer(std::move(c
ontextProvider), std::move(extensionsUtil), discardFramebufferSupported, wantAlp
haChannel, premultipliedAlpha, preserve, wantDepthBuffer, wantStencilBuffer)); |
| 114 if (!drawingBuffer->initialize(size, multisampleSupported)) { | 114 if (!drawingBuffer->initialize(size, multisampleSupported)) { |
| 115 drawingBuffer->beginDestruction(); | 115 drawingBuffer->beginDestruction(); |
| 116 return PassRefPtr<DrawingBuffer>(); | 116 return PassRefPtr<DrawingBuffer>(); |
| 117 } | 117 } |
| 118 return drawingBuffer.release(); | 118 return drawingBuffer.release(); |
| 119 } | 119 } |
| 120 | 120 |
| 121 void DrawingBuffer::forceNextDrawingBufferCreationToFail() | 121 void DrawingBuffer::forceNextDrawingBufferCreationToFail() |
| 122 { | 122 { |
| 123 shouldFailDrawingBufferCreationForTesting = true; | 123 shouldFailDrawingBufferCreationForTesting = true; |
| (...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1056 | 1056 |
| 1057 void DrawingBuffer::restoreTextureBindings() | 1057 void DrawingBuffer::restoreTextureBindings() |
| 1058 { | 1058 { |
| 1059 // This class potentially modifies the bindings for GL_TEXTURE_2D and | 1059 // This class potentially modifies the bindings for GL_TEXTURE_2D and |
| 1060 // GL_TEXTURE_RECTANGLE. Only GL_TEXTURE_2D needs to be restored since | 1060 // GL_TEXTURE_RECTANGLE. Only GL_TEXTURE_2D needs to be restored since |
| 1061 // the public interface for WebGL does not support GL_TEXTURE_RECTANGLE. | 1061 // the public interface for WebGL does not support GL_TEXTURE_RECTANGLE. |
| 1062 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding); | 1062 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding); |
| 1063 } | 1063 } |
| 1064 | 1064 |
| 1065 } // namespace blink | 1065 } // namespace blink |
| OLD | NEW |