Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
GrMockTypes.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2019 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
9
12#include "include/gpu/GrTypes.h"
14
18
20 return GrBackendFormat::MakeMock(fColorType, fCompressionType);
21}
22
24 uint32_t sampleCount,
25 uint32_t levelCount,
26 GrProtected isProtected) {
28 // Shared info
29 info.fSampleCount = sampleCount;
30 info.fLevelCount = levelCount;
31 info.fProtected = isProtected;
32
33 // Mock info
34 info.fColorType = mockSpec.fColorType;
35 info.fCompressionType = mockSpec.fCompressionType;
36
37 return info;
38}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition DM.cpp:213
GrMockSurfaceInfo GrMockTextureSpecToSurfaceInfo(const GrMockTextureSpec &mockSpec, uint32_t sampleCount, uint32_t levelCount, GrProtected isProtected)
static GrBackendFormat MakeMock(GrColorType colorType, SkTextureCompressionType compression, bool isStencilFormat=false)
Protected
Definition GpuTypes.h:61
GrBackendFormat getBackendFormat() const
uint32_t fSampleCount
GrBackendFormat getBackendFormat() const
GrColorType fColorType
SkTextureCompressionType fCompressionType