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 "modules/webgl/WebGL2RenderingContextBase.h" | 5 #include "modules/webgl/WebGL2RenderingContextBase.h" |
6 | 6 |
7 #include "bindings/modules/v8/WebGLAny.h" | 7 #include "bindings/modules/v8/WebGLAny.h" |
8 #include "core/frame/ImageBitmap.h" | 8 #include "core/frame/ImageBitmap.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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 GL_COMPRESSED_SIGNED_RG11_EAC, | 108 GL_COMPRESSED_SIGNED_RG11_EAC, |
109 GL_COMPRESSED_RGB8_ETC2, | 109 GL_COMPRESSED_RGB8_ETC2, |
110 GL_COMPRESSED_SRGB8_ETC2, | 110 GL_COMPRESSED_SRGB8_ETC2, |
111 GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, | 111 GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, |
112 GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, | 112 GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, |
113 GL_COMPRESSED_RGBA8_ETC2_EAC, | 113 GL_COMPRESSED_RGBA8_ETC2_EAC, |
114 GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, | 114 GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, |
115 }; | 115 }; |
116 | 116 |
117 WebGL2RenderingContextBase::WebGL2RenderingContextBase(HTMLCanvasElement* passed
Canvas, std::unique_ptr<WebGraphicsContext3DProvider> contextProvider, const Web
GLContextAttributes& requestedAttributes) | 117 WebGL2RenderingContextBase::WebGL2RenderingContextBase(HTMLCanvasElement* passed
Canvas, std::unique_ptr<WebGraphicsContext3DProvider> contextProvider, const Web
GLContextAttributes& requestedAttributes) |
118 : WebGLRenderingContextBase(passedCanvas, std::move(contextProvider), reques
tedAttributes) | 118 : WebGLRenderingContextBase(passedCanvas, std::move(contextProvider), reques
tedAttributes, 2) |
119 { | 119 { |
120 m_supportedInternalFormatsStorage.insert(kSupportedInternalFormatsStorage, k
SupportedInternalFormatsStorage + WTF_ARRAY_LENGTH(kSupportedInternalFormatsStor
age)); | 120 m_supportedInternalFormatsStorage.insert(kSupportedInternalFormatsStorage, k
SupportedInternalFormatsStorage + WTF_ARRAY_LENGTH(kSupportedInternalFormatsStor
age)); |
121 m_supportedInternalFormatsStorage.insert(kCompressedTextureFormatsETC2EAC, k
CompressedTextureFormatsETC2EAC + WTF_ARRAY_LENGTH(kCompressedTextureFormatsETC2
EAC)); | 121 m_supportedInternalFormatsStorage.insert(kCompressedTextureFormatsETC2EAC, k
CompressedTextureFormatsETC2EAC + WTF_ARRAY_LENGTH(kCompressedTextureFormatsETC2
EAC)); |
122 m_compressedTextureFormatsETC2EAC.insert(kCompressedTextureFormatsETC2EAC, k
CompressedTextureFormatsETC2EAC + WTF_ARRAY_LENGTH(kCompressedTextureFormatsETC2
EAC)); | 122 m_compressedTextureFormatsETC2EAC.insert(kCompressedTextureFormatsETC2EAC, k
CompressedTextureFormatsETC2EAC + WTF_ARRAY_LENGTH(kCompressedTextureFormatsETC2
EAC)); |
123 m_compressedTextureFormats.append(kCompressedTextureFormatsETC2EAC, WTF_ARRA
Y_LENGTH(kCompressedTextureFormatsETC2EAC)); | 123 m_compressedTextureFormats.append(kCompressedTextureFormatsETC2EAC, WTF_ARRA
Y_LENGTH(kCompressedTextureFormatsETC2EAC)); |
124 } | 124 } |
125 | 125 |
126 WebGL2RenderingContextBase::~WebGL2RenderingContextBase() | 126 WebGL2RenderingContextBase::~WebGL2RenderingContextBase() |
127 { | 127 { |
128 m_readFramebufferBinding = nullptr; | 128 m_readFramebufferBinding = nullptr; |
(...skipping 3240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3369 params.skipPixels = m_unpackSkipPixels; | 3369 params.skipPixels = m_unpackSkipPixels; |
3370 params.skipRows = m_unpackSkipRows; | 3370 params.skipRows = m_unpackSkipRows; |
3371 if (dimension == Tex3D) { | 3371 if (dimension == Tex3D) { |
3372 params.imageHeight = m_unpackImageHeight; | 3372 params.imageHeight = m_unpackImageHeight; |
3373 params.skipImages = m_unpackSkipImages; | 3373 params.skipImages = m_unpackSkipImages; |
3374 } | 3374 } |
3375 return params; | 3375 return params; |
3376 } | 3376 } |
3377 | 3377 |
3378 } // namespace blink | 3378 } // namespace blink |
OLD | NEW |