blob: 521fd5d684dec31b19c6d9452d682a917fa2c1b6 [file] [log] [blame]
/*
* Copyright 2020 Google LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "src/gpu/d3d/GrD3DUtil.h"
#include "src/gpu/GrContextPriv.h"
#include "src/gpu/GrDataUtils.h"
#include "src/gpu/d3d/GrD3DGpu.h"
#include "src/sksl/SkSLCompiler.h"
bool GrDxgiFormatIsCompressed(DXGI_FORMAT format) {
switch (format) {
case DXGI_FORMAT_BC1_UNORM:
return true;
default:
return false;
}
SkUNREACHABLE;
}
SkImage::CompressionType GrDxgiFormatToCompressionType(DXGI_FORMAT format) {
switch (format) {
case DXGI_FORMAT_BC1_UNORM: return SkImage::CompressionType::kBC1_RGBA8_UNORM;
default: return SkImage::CompressionType::kNone;
}
SkUNREACHABLE;
}