| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "config.h" | 5 #include "config.h" |
| 6 #include "core/html/canvas/WebGL2RenderingContextBase.h" | 6 #include "core/html/canvas/WebGL2RenderingContextBase.h" |
| 7 | 7 |
| 8 #include "bindings/core/v8/WebGLAny.h" | 8 #include "bindings/core/v8/WebGLAny.h" |
| 9 #include "core/html/HTMLCanvasElement.h" | 9 #include "core/html/HTMLCanvasElement.h" |
| 10 #include "core/html/HTMLImageElement.h" | 10 #include "core/html/HTMLImageElement.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 } // namespace | 40 } // namespace |
| 41 | 41 |
| 42 WebGL2RenderingContextBase::WebGL2RenderingContextBase(HTMLCanvasElement* passed
Canvas, PassOwnPtr<WebGraphicsContext3D> context, const WebGLContextAttributes&
requestedAttributes) | 42 WebGL2RenderingContextBase::WebGL2RenderingContextBase(HTMLCanvasElement* passed
Canvas, PassOwnPtr<WebGraphicsContext3D> context, const WebGLContextAttributes&
requestedAttributes) |
| 43 : WebGLRenderingContextBase(passedCanvas, context, requestedAttributes) | 43 : WebGLRenderingContextBase(passedCanvas, context, requestedAttributes) |
| 44 { | 44 { |
| 45 | 45 |
| 46 } | 46 } |
| 47 | 47 |
| 48 WebGL2RenderingContextBase::~WebGL2RenderingContextBase() | 48 WebGL2RenderingContextBase::~WebGL2RenderingContextBase() |
| 49 { | 49 { |
| 50 #if !ENABLE(OILPAN) | |
| 51 m_readFramebufferBinding = nullptr; | 50 m_readFramebufferBinding = nullptr; |
| 52 | 51 |
| 53 m_boundCopyReadBuffer = nullptr; | 52 m_boundCopyReadBuffer = nullptr; |
| 54 m_boundCopyWriteBuffer = nullptr; | 53 m_boundCopyWriteBuffer = nullptr; |
| 55 m_boundPixelPackBuffer = nullptr; | 54 m_boundPixelPackBuffer = nullptr; |
| 56 m_boundPixelUnpackBuffer = nullptr; | 55 m_boundPixelUnpackBuffer = nullptr; |
| 57 m_boundTransformFeedbackBuffer = nullptr; | 56 m_boundTransformFeedbackBuffer = nullptr; |
| 58 m_boundUniformBuffer = nullptr; | 57 m_boundUniformBuffer = nullptr; |
| 59 #endif | |
| 60 } | 58 } |
| 61 | 59 |
| 62 void WebGL2RenderingContextBase::initializeNewContext() | 60 void WebGL2RenderingContextBase::initializeNewContext() |
| 63 { | 61 { |
| 64 ASSERT(!isContextLost()); | 62 ASSERT(!isContextLost()); |
| 65 ASSERT(drawingBuffer()); | 63 ASSERT(drawingBuffer()); |
| 66 | 64 |
| 67 m_readFramebufferBinding = nullptr; | 65 m_readFramebufferBinding = nullptr; |
| 68 | 66 |
| 69 m_boundCopyReadBuffer = nullptr; | 67 m_boundCopyReadBuffer = nullptr; |
| (...skipping 2008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2078 m_boundPixelUnpackBuffer = nullptr; | 2076 m_boundPixelUnpackBuffer = nullptr; |
| 2079 if (m_boundTransformFeedbackBuffer == buffer) | 2077 if (m_boundTransformFeedbackBuffer == buffer) |
| 2080 m_boundTransformFeedbackBuffer = nullptr; | 2078 m_boundTransformFeedbackBuffer = nullptr; |
| 2081 if (m_boundUniformBuffer == buffer) | 2079 if (m_boundUniformBuffer == buffer) |
| 2082 m_boundUniformBuffer = nullptr; | 2080 m_boundUniformBuffer = nullptr; |
| 2083 | 2081 |
| 2084 WebGLRenderingContextBase::removeBoundBuffer(buffer); | 2082 WebGLRenderingContextBase::removeBoundBuffer(buffer); |
| 2085 } | 2083 } |
| 2086 | 2084 |
| 2087 } // namespace blink | 2085 } // namespace blink |
| OLD | NEW |