/src/mozilla-central/dom/canvas/WebGLExtensionTextureFloatLinear.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | /* This Source Code Form is subject to the terms of the Mozilla Public |
2 | | * License, v. 2.0. If a copy of the MPL was not distributed with this file, |
3 | | * You can obtain one at http://mozilla.org/MPL/2.0/. */ |
4 | | |
5 | | #include "WebGLExtensions.h" |
6 | | |
7 | | #include "GLContext.h" |
8 | | #include "mozilla/dom/WebGLRenderingContextBinding.h" |
9 | | #include "WebGLContext.h" |
10 | | #include "WebGLFormats.h" |
11 | | |
12 | | namespace mozilla { |
13 | | |
14 | | WebGLExtensionTextureFloatLinear::WebGLExtensionTextureFloatLinear(WebGLContext* webgl) |
15 | | : WebGLExtensionBase(webgl) |
16 | 0 | { |
17 | 0 | auto& fua = webgl->mFormatUsage; |
18 | 0 |
|
19 | 0 | fua->EditUsage(webgl::EffectiveFormat::RGBA32F)->isFilterable = true; |
20 | 0 | fua->EditUsage(webgl::EffectiveFormat::RGB32F)->isFilterable = true; |
21 | 0 |
|
22 | 0 | if (webgl->IsWebGL2()) { |
23 | 0 | fua->EditUsage(webgl::EffectiveFormat::R32F)->isFilterable = true; |
24 | 0 | fua->EditUsage(webgl::EffectiveFormat::RG32F)->isFilterable = true; |
25 | 0 | } else { |
26 | 0 | fua->EditUsage(webgl::EffectiveFormat::Luminance32FAlpha32F)->isFilterable = true; |
27 | 0 | fua->EditUsage(webgl::EffectiveFormat::Luminance32F)->isFilterable = true; |
28 | 0 | fua->EditUsage(webgl::EffectiveFormat::Alpha32F)->isFilterable = true; |
29 | 0 | } |
30 | 0 | } |
31 | | |
32 | | WebGLExtensionTextureFloatLinear::~WebGLExtensionTextureFloatLinear() |
33 | 0 | { |
34 | 0 | } |
35 | | |
36 | | IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionTextureFloatLinear, OES_texture_float_linear) |
37 | | |
38 | | } // namespace mozilla |