Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/canvas/WebGLExtensionDebugShaders.cpp
Line
Count
Source (jump to first uncovered line)
1
/* -*- Mode: C++; tab-width: 20; 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 "WebGLExtensions.h"
7
8
#include "mozilla/dom/WebGLRenderingContextBinding.h"
9
#include "WebGLContext.h"
10
#include "WebGLShader.h"
11
12
namespace mozilla {
13
14
WebGLExtensionDebugShaders::WebGLExtensionDebugShaders(WebGLContext* webgl)
15
    : WebGLExtensionBase(webgl)
16
0
{
17
0
}
18
19
WebGLExtensionDebugShaders::~WebGLExtensionDebugShaders()
20
0
{
21
0
}
22
23
// If no source has been defined, compileShader() has not been called, or the
24
// translation has failed for shader, an empty string is returned; otherwise,
25
// return the translated source.
26
void
27
WebGLExtensionDebugShaders::GetTranslatedShaderSource(const WebGLShader& shader,
28
                                                      nsAString& retval) const
29
0
{
30
0
    retval.SetIsVoid(true);
31
0
    if (mIsLost)
32
0
        return;
33
0
34
0
    const WebGLContext::FuncScope funcScope(*mContext, "getShaderTranslatedSource");
35
0
    MOZ_ASSERT(!mContext->IsContextLost());
36
0
37
0
    if (!mContext->ValidateObject("shader", shader))
38
0
        return;
39
0
40
0
    shader.GetShaderTranslatedSource(&retval);
41
0
}
42
43
IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionDebugShaders, WEBGL_debug_shaders)
44
45
} // namespace mozilla