Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
src
gpu
ganesh
mock
GrMockSurfaceProxy.h
Go to the documentation of this file.
1
/*
2
* Copyright 2021 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 GrMockSurfaceProxy_DEFINED
9
#define GrMockSurfaceProxy_DEFINED
10
11
#include "
include/core/SkRefCnt.h
"
12
#include "
include/core/SkSize.h
"
13
#include "
include/core/SkString.h
"
14
#include "
include/core/SkTextureCompressionType.h
"
15
#include "
include/gpu/GpuTypes.h
"
16
#include "
include/gpu/GrBackendSurface.h
"
17
#include "
include/private/base/SkAssert.h
"
18
#include "
include/private/base/SkDebug.h
"
19
#include "
include/private/gpu/ganesh/GrTypesPriv.h
"
20
#include "
src/gpu/SkBackingFit.h
"
21
#include "
src/gpu/ganesh/GrSurfaceProxy.h
"
22
23
#include <cstddef>
24
#include <string_view>
25
#include <utility>
26
27
class
GrResourceProvider
;
28
class
GrSurface
;
29
30
class
GrMockSurfaceProxy
:
public
GrSurfaceProxy
{
31
public
:
32
GrMockSurfaceProxy
(
SkString
name
, std::string_view label)
33
:
GrSurfaceProxy
(
GrBackendFormat
::MakeMock(
GrColorType
::
kRGBA_8888
,
34
SkTextureCompressionType
::
kNone
),
35
SkISize
::
Make
(1, 1),
36
SkBackingFit
::
kExact
,
37
skgpu
::Budgeted::
kNo
,
38
skgpu
::
Protected
::
kNo
,
39
GrInternalSurfaceFlags
::
kNone
,
40
UseAllocator
::
kNo
,
41
label) {
42
SkDEBUGCODE
(this->setDebugName(std::move(
name
)));
43
}
44
45
bool
instantiate
(
GrResourceProvider
*)
override
{
return
false
; }
46
SkDEBUGCODE
(
void
onValidateSurface(
const
GrSurface
*)
override
{} )
47
size_t
onUninstantiatedGpuMemorySize()
const override
{
return
0; }
48
49
protected
:
50
sk_sp<GrSurface>
createSurface
(
GrResourceProvider
*)
const override
{
return
nullptr
; }
51
52
private
:
53
LazySurfaceDesc
callbackDesc
()
const override
{
SkUNREACHABLE
; }
54
};
55
56
#endif
GpuTypes.h
GrBackendSurface.h
GrSurfaceProxy.h
GrTypesPriv.h
GrColorType
GrColorType
Definition
GrTypesPriv.h:539
GrColorType::kRGBA_8888
@ kRGBA_8888
GrInternalSurfaceFlags
GrInternalSurfaceFlags
Definition
GrTypesPriv.h:435
SkAssert.h
SkUNREACHABLE
#define SkUNREACHABLE
Definition
SkAssert.h:135
SkBackingFit.h
SkBackingFit
SkBackingFit
Definition
SkBackingFit.h:16
SkBackingFit::kExact
@ kExact
SkDebug.h
SkDEBUGCODE
#define SkDEBUGCODE(...)
Definition
SkDebug.h:23
Make
static std::unique_ptr< SkEncoder > Make(SkWStream *dst, const SkPixmap *src, const SkYUVAPixmaps *srcYUVA, const SkColorSpace *srcYUVAColorSpace, const SkJpegEncoder::Options &options)
Definition
SkJpegEncoderImpl.cpp:259
SkRefCnt.h
SkSize.h
SkString.h
SkTextureCompressionType.h
SkTextureCompressionType
SkTextureCompressionType
Definition
SkTextureCompressionType.h:20
GrBackendFormat
Definition
GrBackendSurface.h:44
GrMockSurfaceProxy
Definition
GrMockSurfaceProxy.h:30
GrMockSurfaceProxy::createSurface
sk_sp< GrSurface > createSurface(GrResourceProvider *) const override
Definition
GrMockSurfaceProxy.h:50
GrMockSurfaceProxy::callbackDesc
LazySurfaceDesc callbackDesc() const override
Definition
GrMockSurfaceProxy.h:53
GrMockSurfaceProxy::instantiate
bool instantiate(GrResourceProvider *) override
Definition
GrMockSurfaceProxy.h:45
GrMockSurfaceProxy::GrMockSurfaceProxy
GrMockSurfaceProxy(SkString name, std::string_view label)
Definition
GrMockSurfaceProxy.h:32
GrMockSurfaceProxy::SkDEBUGCODE
SkDEBUGCODE(void onValidateSurface(const GrSurface *) override {}) size_t onUninstantiatedGpuMemorySize() const override
Definition
GrMockSurfaceProxy.h:46
GrResourceProvider
Definition
GrResourceProvider.h:59
GrSurfaceProxy
Definition
GrSurfaceProxy.h:49
GrSurfaceProxy::UseAllocator
UseAllocator
Definition
GrSurfaceProxy.h:124
GrSurfaceProxy::UseAllocator::kNo
@ kNo
GrSurfaceProxy::ResolveFlags::kNone
@ kNone
GrSurface
Definition
GrSurface.h:22
SkString
Definition
SkString.h:118
sk_sp
Definition
SkRefCnt.h:220
name
const char * name
Definition
fuchsia.cc:50
skgpu
Definition
GpuTools.h:21
skgpu::Protected
Protected
Definition
GpuTypes.h:61
GrSurfaceProxy::LazySurfaceDesc
Definition
GrSurfaceProxy.h:87
SkISize
Definition
SkSize.h:16
Generated on Fri Apr 26 2024 06:17:06 for Flutter Engine by
1.9.8