• 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/include/TextureInfo.h"
9 
10 namespace skgpu {
11 
operator ==(const TextureInfo & that) const12 bool TextureInfo::operator==(const TextureInfo& that) const {
13     if (!this->isValid() || !that.isValid()) {
14         return false;
15     }
16 
17     if (fBackend != that.fBackend) {
18         return false;
19     }
20 
21     if (fSampleCount != that.fSampleCount ||
22         fLevelCount != that.fLevelCount ||
23         fProtected != that.fProtected) {
24         return false;
25     }
26 
27     switch (fBackend) {
28 #ifdef SK_METAL
29         case BackendApi::kMetal:
30             return fMtlSpec == that.fMtlSpec;
31 #endif
32         default:
33             return false;
34     }
35 }
36 
37 } // namespace skgpu
38 
39