Coverage Report

Created: 2024-05-20 07:14

/src/skia/include/core/SkCapabilities.h
Line
Count
Source
1
/*
2
 * Copyright 2022 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
#ifndef SkCapabilities_DEFINED
9
#define SkCapabilities_DEFINED
10
11
#include "include/core/SkRefCnt.h"
12
#include "include/core/SkTypes.h"
13
#include "include/sksl/SkSLVersion.h"
14
15
namespace SkSL { struct ShaderCaps; }
16
17
#if defined(SK_GRAPHITE)
18
namespace skgpu::graphite { class Caps; }
19
#endif
20
21
class SK_API SkCapabilities : public SkRefCnt {
22
public:
23
    static sk_sp<const SkCapabilities> RasterBackend();
24
25
60.3k
    SkSL::Version skslVersion() const { return fSkSLVersion; }
26
27
protected:
28
#if defined(SK_GRAPHITE)
29
    friend class skgpu::graphite::Caps; // for ctor
30
#endif
31
32
2.58k
    SkCapabilities() = default;
33
34
    void initSkCaps(const SkSL::ShaderCaps*);
35
36
    SkSL::Version fSkSLVersion = SkSL::Version::k100;
37
};
38
39
#endif