• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include "include/core/SkCapabilities.h"
9 
10 #include "src/sksl/SkSLUtil.h"
11 
RasterBackend()12 sk_sp<const SkCapabilities> SkCapabilities::RasterBackend() {
13     static SkCapabilities* sCaps = []() {
14         SkCapabilities* caps = new SkCapabilities;
15         caps->fSkSLVersion = SkSL::Version::k100;
16         return caps;
17     }();
18 
19     return sk_ref_sp(sCaps);
20 }
21 
initSkCaps(const SkSL::ShaderCaps * shaderCaps)22 void SkCapabilities::initSkCaps(const SkSL::ShaderCaps* shaderCaps) {
23     this->fSkSLVersion = shaderCaps->supportedSkSLVerion();
24 }
25