Flutter Engine
The Flutter Engine
third_party
skia
src
gpu
ganesh
mock
GrMockAttachment.h
Go to the documentation of this file.
1
/*
2
* Copyright 2017 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 GrMockAttachment_DEFINED
9
#define GrMockAttachment_DEFINED
10
11
#include "
include/core/SkSize.h
"
12
#include "
include/core/SkTextureCompressionType.h
"
13
#include "
include/gpu/GpuTypes.h
"
14
#include "
include/gpu/GrBackendSurface.h
"
15
#include "
include/private/base/SkAssert.h
"
16
#include "
include/private/gpu/ganesh/GrTypesPriv.h
"
17
#include "
src/gpu/ganesh/GrAttachment.h
"
18
#include "
src/gpu/ganesh/mock/GrMockGpu.h
"
19
20
#include <string_view>
21
22
class
GrMockAttachment
:
public
GrAttachment
{
23
public
:
24
GrMockAttachment
(
GrMockGpu
* gpu,
25
SkISize
dimensions
,
26
UsageFlags
supportedUsages
,
27
int
sampleCnt,
28
std::string_view label)
29
:
INHERITED
(gpu,
30
dimensions
,
31
supportedUsages
,
32
sampleCnt,
33
skgpu
::
Mipmapped
::
kNo
,
34
skgpu
::
Protected
::
kNo
,
35
label) {
36
SkASSERT
(
supportedUsages
==
UsageFlags::kStencilAttachment
);
37
this->
registerWithCache
(
skgpu::Budgeted::kYes
);
38
}
39
40
GrBackendFormat
backendFormat
()
const override
{
41
return
GrBackendFormat::MakeMock
(
GrColorType::kUnknown
,
SkTextureCompressionType::kNone
,
42
/*isStencilFormat*/
true
);
43
}
44
45
private
:
46
using
INHERITED =
GrAttachment
;
47
};
48
49
#endif
GpuTypes.h
GrAttachment.h
GrBackendSurface.h
GrMockGpu.h
GrTypesPriv.h
GrColorType::kUnknown
@ kUnknown
SkAssert.h
SkASSERT
#define SkASSERT(cond)
Definition:
SkAssert.h:116
SkApplyPerspectiveClip::kNo
@ kNo
Don't pre-clip the geometry before applying the (perspective) matrix.
SkSize.h
SkTextureCompressionType.h
SkTextureCompressionType::kNone
@ kNone
GrAttachment
Definition:
GrAttachment.h:25
GrAttachment::GrAttachment
GrAttachment(GrGpu *gpu, SkISize dimensions, UsageFlags supportedUsages, int sampleCnt, skgpu::Mipmapped mipmapped, GrProtected isProtected, std::string_view label, GrMemoryless memoryless=GrMemoryless::kNo)
Definition:
GrAttachment.h:73
GrAttachment::supportedUsages
UsageFlags supportedUsages() const
Definition:
GrAttachment.h:36
GrAttachment::UsageFlags
UsageFlags
Definition:
GrAttachment.h:27
GrAttachment::UsageFlags::kStencilAttachment
@ kStencilAttachment
GrBackendFormat
Definition:
GrBackendSurface.h:44
GrBackendFormat::MakeMock
static GrBackendFormat MakeMock(GrColorType colorType, SkTextureCompressionType compression, bool isStencilFormat=false)
Definition:
GrBackendSurface.cpp:189
GrGpuResource::registerWithCache
void registerWithCache(skgpu::Budgeted)
Definition:
GrGpuResource.cpp:32
GrMockAttachment
Definition:
GrMockAttachment.h:22
GrMockAttachment::GrMockAttachment
GrMockAttachment(GrMockGpu *gpu, SkISize dimensions, UsageFlags supportedUsages, int sampleCnt, std::string_view label)
Definition:
GrMockAttachment.h:24
GrMockAttachment::backendFormat
GrBackendFormat backendFormat() const override
Definition:
GrMockAttachment.h:40
GrMockGpu
Definition:
GrMockGpu.h:53
GrSurface
Definition:
GrSurface.h:22
GrSurface::dimensions
SkISize dimensions() const
Definition:
GrSurface.h:27
skgpu
Definition:
GpuTools.h:21
skgpu::Budgeted::kYes
@ kYes
skgpu::Mipmapped
Mipmapped
Definition:
GpuTypes.h:53
skgpu::Protected
Protected
Definition:
GpuTypes.h:61
SkISize
Definition:
SkSize.h:16
Generated on Sun Jun 23 2024 21:56:22 for Flutter Engine by
1.9.4