Coverage Report

Created: 2021-08-22 09:07

/src/skia/src/sksl/SkSLContext.cpp
Line
Count
Source
1
/*
2
 * Copyright 2021 Google LLC
3
 *
4
 * Use of this source code is governed by a BSD-style license that can be
5
 * found in the LICENSE file.
6
 */
7
8
#include "src/sksl/SkSLContext.h"
9
10
#include "include/sksl/DSLCore.h"
11
#include "src/sksl/dsl/priv/DSLWriter.h"
12
13
namespace SkSL {
14
15
Context::Context(ErrorReporter& errors, const ShaderCapsClass& caps)
16
        : fCaps(caps)
17
46.0k
        , fErrors(errors) {
18
46.0k
    SkASSERT(!Pool::IsAttached());
19
46.0k
}
SkSL::Context::Context(SkSL::ErrorReporter&, GrShaderCaps const&)
Line
Count
Source
17
1.33k
        , fErrors(errors) {
18
1.33k
    SkASSERT(!Pool::IsAttached());
19
1.33k
}
SkSL::Context::Context(SkSL::ErrorReporter&, GrShaderCaps const&)
Line
Count
Source
17
44.7k
        , fErrors(errors) {
18
44.7k
    SkASSERT(!Pool::IsAttached());
19
44.7k
}
20
21
1.93M
ErrorReporter& Context::errors() const {
22
1.93M
    if (dsl::DSLWriter::IsActive()) {
23
1.23M
        return dsl::GetErrorReporter();
24
1.23M
    }
25
696k
    return fErrors;
26
696k
}
27
28
}  // namespace SkSL
29