Flutter Engine
The Flutter Engine
third_party
skia
src
gpu
ganesh
mock
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
8
#include "
include/gpu/mock/GrMockTypes.h
"
9
10
#include "
include/core/SkTextureCompressionType.h
"
11
#include "
include/gpu/GrBackendSurface.h
"
12
#include "
include/gpu/GrTypes.h
"
13
#include "
src/gpu/ganesh/mock/GrMockTypesPriv.h
"
14
15
GrBackendFormat
GrMockRenderTargetInfo::getBackendFormat
()
const
{
16
return
GrBackendFormat::MakeMock
(fColorType,
SkTextureCompressionType::kNone
);
17
}
18
19
GrBackendFormat
GrMockTextureInfo::getBackendFormat
()
const
{
20
return
GrBackendFormat::MakeMock
(fColorType, fCompressionType);
21
}
22
23
GrMockSurfaceInfo
GrMockTextureSpecToSurfaceInfo
(
const
GrMockTextureSpec
& mockSpec,
24
uint32_t sampleCount,
25
uint32_t levelCount,
26
GrProtected
isProtected) {
27
GrMockSurfaceInfo
info
;
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
}
info
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition:
DM.cpp:213
GrBackendSurface.h
GrMockTypesPriv.h
GrMockTextureSpecToSurfaceInfo
GrMockSurfaceInfo GrMockTextureSpecToSurfaceInfo(const GrMockTextureSpec &mockSpec, uint32_t sampleCount, uint32_t levelCount, GrProtected isProtected)
Definition:
GrMockTypes.cpp:23
GrMockTypes.h
GrTypes.h
SkTextureCompressionType.h
SkTextureCompressionType::kNone
@ kNone
GrBackendFormat
Definition:
GrBackendSurface.h:44
GrBackendFormat::MakeMock
static GrBackendFormat MakeMock(GrColorType colorType, SkTextureCompressionType compression, bool isStencilFormat=false)
Definition:
GrBackendSurface.cpp:189
skgpu::Protected
Protected
Definition:
GpuTypes.h:61
GrMockRenderTargetInfo::getBackendFormat
GrBackendFormat getBackendFormat() const
Definition:
GrMockTypes.cpp:15
GrMockSurfaceInfo
Definition:
GrMockTypes.h:101
GrMockTextureInfo::getBackendFormat
GrBackendFormat getBackendFormat() const
Definition:
GrMockTypes.cpp:19
GrMockTextureSpec
Definition:
GrMockTypesPriv.h:18
GrMockTextureSpec::fColorType
GrColorType fColorType
Definition:
GrMockTypesPriv.h:26
GrMockTextureSpec::fCompressionType
SkTextureCompressionType fCompressionType
Definition:
GrMockTypesPriv.h:27
Generated on Sun Jun 23 2024 21:56:22 for Flutter Engine by
1.9.4