blob: 1c631c63b4a506da4830aebd87d4d9e1ec0cd5c9 [file] [log] [blame]
/*
* Copyright 2021 Google LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "experimental/graphite/include/TextureInfo.h"
namespace skgpu {
bool TextureInfo::operator==(const TextureInfo& that) const {
if (!this->isValid() || !that.isValid()) {
return false;
}
if (fBackend != that.fBackend) {
return false;
}
if (fSampleCount != that.fSampleCount ||
fLevelCount != that.fLevelCount ||
fProtected != that.fProtected) {
return false;
}
switch (fBackend) {
#ifdef SK_METAL
case BackendApi::kMetal:
return fMtlSpec == that.fMtlSpec;
#endif
default:
return false;
}
}
} // namespace skgpu