skia2/include/core/SkCapabilities.h
Brian Osman 14194828eb Remove SkSL portions of SkCapabilities when SkSL is not enabled
Also fix various compile issues if you try to compile w/o SkSL.

Change-Id: I9a5a176254184a04f4c8af93a8dca958c8c69fee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/542142
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-05-19 19:32:48 +00:00

37 lines
740 B
C++

/*
* Copyright 2022 Google LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkCapabilities_DEFINED
#define SkCapabilities_DEFINED
#include "include/core/SkRefCnt.h"
#ifdef SK_ENABLE_SKSL
#include "include/sksl/SkSLVersion.h"
namespace SkSL { struct ShaderCaps; }
#endif
class SK_API SkCapabilities : public SkRefCnt {
public:
static sk_sp<const SkCapabilities> RasterBackend();
#ifdef SK_ENABLE_SKSL
SkSL::Version skslVersion() const { return fSkSLVersion; }
#endif
protected:
SkCapabilities() = default;
#ifdef SK_ENABLE_SKSL
void initSkCaps(const SkSL::ShaderCaps*);
SkSL::Version fSkSLVersion = SkSL::Version::k100;
#endif
};
#endif