blob: c2c87112190a9747fea50a93267ad58c157dc78e [file] [log] [blame]
Stephen White985741a2019-07-18 11:43:45 -04001/*
2 * Copyright 2019 Google Inc.
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#ifndef GrDawnUtil_DEFINED
9#define GrDawnUtil_DEFINED
10
11#include "include/private/GrTypesPriv.h"
12#include "dawn/dawncpp.h"
13
14GrPixelConfig GrDawnFormatToPixelConfig(dawn::TextureFormat format);
Stephen Whited7325182019-08-02 17:22:59 -040015bool GrDawnFormatIsRenderable(dawn::TextureFormat format);
Stephen White985741a2019-07-18 11:43:45 -040016bool GrPixelConfigToDawnFormat(GrPixelConfig config, dawn::TextureFormat* format);
Stephen White0850dcd2019-08-13 15:28:47 -040017size_t GrDawnRoundRowBytes(size_t rowBytes);
Stephen Whited7325182019-08-02 17:22:59 -040018#if GR_TEST_UTILS
19const char* GrDawnFormatToStr(dawn::TextureFormat format);
20#endif
Stephen White985741a2019-07-18 11:43:45 -040021
22#endif // GrDawnUtil_DEFINED