Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/canvas/WebGL2ContextTextures.cpp
Line
Count
Source (jump to first uncovered line)
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/* This Source Code Form is subject to the terms of the Mozilla Public
3
 * License, v. 2.0. If a copy of the MPL was not distributed with this
4
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6
#include "GLContext.h"
7
#include "WebGL2Context.h"
8
#include "WebGLContextUtils.h"
9
#include "WebGLTexture.h"
10
11
namespace mozilla {
12
13
void
14
WebGL2Context::TexStorage(uint8_t funcDims, GLenum rawTarget,
15
                          GLsizei levels, GLenum internalFormat, GLsizei width,
16
                          GLsizei height, GLsizei depth)
17
0
{
18
0
    const FuncScope funcScope(*this, "texStorage");
19
0
20
0
    TexTarget target;
21
0
    WebGLTexture* tex;
22
0
    if (!ValidateTexTarget(this, funcDims, rawTarget, &target, &tex))
23
0
        return;
24
0
25
0
    tex->TexStorage(target, levels, internalFormat, width, height, depth);
26
0
}
27
28
////////////////////
29
30
/*virtual*/ bool
31
WebGL2Context::IsTexParamValid(GLenum pname) const
32
0
{
33
0
    switch (pname) {
34
0
    case LOCAL_GL_TEXTURE_BASE_LEVEL:
35
0
    case LOCAL_GL_TEXTURE_COMPARE_FUNC:
36
0
    case LOCAL_GL_TEXTURE_COMPARE_MODE:
37
0
    case LOCAL_GL_TEXTURE_IMMUTABLE_FORMAT:
38
0
    case LOCAL_GL_TEXTURE_IMMUTABLE_LEVELS:
39
0
    case LOCAL_GL_TEXTURE_MAX_LEVEL:
40
0
    case LOCAL_GL_TEXTURE_WRAP_R:
41
0
    case LOCAL_GL_TEXTURE_MAX_LOD:
42
0
    case LOCAL_GL_TEXTURE_MIN_LOD:
43
0
        return true;
44
0
45
0
    default:
46
0
        return WebGLContext::IsTexParamValid(pname);
47
0
    }
48
0
}
49
50
} // namespace mozilla