Flutter Engine
The Flutter Engine
third_party
skia
include
gpu
ganesh
vk
GrBackendDrawableInfo.h
Go to the documentation of this file.
1
/*
2
* Copyright 2018 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 GrBackendDrawableInfo_DEFINED
9
#define GrBackendDrawableInfo_DEFINED
10
11
#include "
include/gpu/GrTypes.h
"
12
13
#include "
include/gpu/vk/GrVkTypes.h
"
14
15
// If necessary, this could be pulled into a generic interface, but at this point, we only expect
16
// it to be used by the Ganesh Vulkan backend.
17
class
SK_API
GrBackendDrawableInfo
{
18
public
:
19
// Creates an invalid backend drawable info.
20
GrBackendDrawableInfo
() : fIsValid(
false
) {}
21
22
GrBackendDrawableInfo
(
const
GrVkDrawableInfo
&
info
)
23
: fIsValid(
true
)
24
, fBackend(
GrBackendApi
::
kVulkan
)
25
, fVkInfo(
info
) {}
26
27
// Returns true if the backend texture has been initialized.
28
bool
isValid
()
const
{
return
fIsValid; }
29
30
GrBackendApi
backend
()
const
{
return
fBackend; }
31
32
bool
getVkDrawableInfo
(
GrVkDrawableInfo
* outInfo)
const
{
33
if
(this->isValid() &&
GrBackendApi::kVulkan
== fBackend) {
34
*outInfo = fVkInfo;
35
return
true
;
36
}
37
return
false
;
38
}
39
40
private
:
41
bool
fIsValid;
42
GrBackendApi
fBackend;
43
GrVkDrawableInfo
fVkInfo;
44
};
45
46
#endif
info
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition:
DM.cpp:213
GrTypes.h
GrBackendApi
GrBackendApi
Definition:
GrTypes.h:95
GrBackendApi::kVulkan
@ kVulkan
GrVkTypes.h
SK_API
#define SK_API
Definition:
SkAPI.h:35
GrBackendDrawableInfo
Definition:
GrBackendDrawableInfo.h:17
GrBackendDrawableInfo::GrBackendDrawableInfo
GrBackendDrawableInfo()
Definition:
GrBackendDrawableInfo.h:20
GrBackendDrawableInfo::backend
GrBackendApi backend() const
Definition:
GrBackendDrawableInfo.h:30
GrBackendDrawableInfo::getVkDrawableInfo
bool getVkDrawableInfo(GrVkDrawableInfo *outInfo) const
Definition:
GrBackendDrawableInfo.h:32
GrBackendDrawableInfo::GrBackendDrawableInfo
GrBackendDrawableInfo(const GrVkDrawableInfo &info)
Definition:
GrBackendDrawableInfo.h:22
GrBackendDrawableInfo::isValid
bool isValid() const
Definition:
GrBackendDrawableInfo.h:28
dart::false
false
Definition:
isolate_reload.cc:58
GrVkDrawableInfo
Definition:
GrVkTypes.h:84
true
true
Definition:
verylargebitmap.cpp:163
Generated on Sun Jun 23 2024 21:56:02 for Flutter Engine by
1.9.4