• 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 "include/private/gpu/ganesh/GrDawnTypesPriv.h"
9 
GrDawnTextureSpecToSurfaceInfo(const GrDawnTextureSpec & dawnSpec,uint32_t sampleCount,uint32_t levelCount,GrProtected isProtected)10 GrDawnSurfaceInfo GrDawnTextureSpecToSurfaceInfo(const GrDawnTextureSpec& dawnSpec,
11                                                  uint32_t sampleCount,
12                                                  uint32_t levelCount,
13                                                  GrProtected isProtected) {
14     GrDawnSurfaceInfo info;
15     // Shared info
16     info.fSampleCount = sampleCount;
17     info.fLevelCount = levelCount;
18     info.fProtected = isProtected;
19 
20     // Dawn info
21     info.fFormat = dawnSpec.fFormat;
22 
23     return info;
24 }
25