• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 "experimental/graphite/src/Caps.h"
9 
10 #include "experimental/graphite/include/TextureInfo.h"
11 #include "src/sksl/SkSLUtil.h"
12 
13 namespace skgpu {
14 
Caps()15 Caps::Caps() {}
~Caps()16 Caps::~Caps() {}
17 
isTexturable(const TextureInfo & info) const18 bool Caps::isTexturable(const TextureInfo& info) const {
19     if (info.numSamples() > 1) {
20         return false;
21     }
22     return this->onIsTexturable(info);
23 }
24 
areColorTypeAndTextureInfoCompatible(SkColorType type,const TextureInfo & info) const25 bool Caps::areColorTypeAndTextureInfoCompatible(SkColorType type, const TextureInfo& info) const {
26     if (type == kUnknown_SkColorType) {
27         return false;
28     }
29 
30     return this->onAreColorTypeAndTextureInfoCompatible(type, info);
31 }
32 
33 } // namespace skgpu
34