| 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 |
namespace skgpu::graphite { class Caps; } |
| 18 |
|
| 19 |
class SK_API SkCapabilities : public SkRefCnt { |
| 20 |
public: |
| 21 |
static sk_sp<const SkCapabilities> RasterBackend(); |
| 22 |
|
| 23 |
SkSL::Version skslVersion() const { return fSkSLVersion; } |
| 24 |
|
| 25 |
protected: |
| 26 |
friend class skgpu::graphite::Caps; // for ctor |
| 27 |
|
| 28 |
SkCapabilities() = default; |
| 29 |
|
| 30 |
void initSkCaps(const SkSL::ShaderCaps*); |
| 31 |
|
| 32 |
SkSL::Version fSkSLVersion = SkSL::Version::k100; |
| 33 |
}; |
| 34 |
|
| 35 |
#endif |