Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
tools
gpu
ProtectedUtils.h
Go to the documentation of this file.
1
/*
2
* Copyright 2023 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
#ifndef ProtectedUtils_DEFINED
9
#define ProtectedUtils_DEFINED
10
11
#include "
include/core/SkColor.h
"
12
#include "
include/core/SkRefCnt.h
"
13
14
class
GrDirectContext
;
15
class
SkImage
;
16
class
SkSurface
;
17
class
SkSurfaceProps
;
18
struct
SkISize
;
19
20
#ifdef SK_GRAPHITE
21
namespace
skgpu
{
22
enum class
Protected
: bool;
23
}
24
namespace
skgpu::graphite
{
25
class
Recorder
;
26
}
27
#endif
28
29
namespace
ProtectedUtils
{
30
31
/*
32
* These factories create Surfaces and Images with an explicitly specified protected status.
33
* If the Surface/Image cannot be created with the specified protected status nullptr will
34
* be returned.
35
*/
36
37
sk_sp<SkSurface>
CreateProtectedSkSurface
(
GrDirectContext
*,
38
SkISize
size,
39
bool
textureable,
40
bool
isProtected,
41
const
SkSurfaceProps
* =
nullptr
);
42
43
void
CheckImageBEProtection
(
SkImage
*,
bool
expectingProtected);
44
45
sk_sp<SkImage>
CreateProtectedSkImage
(
GrDirectContext
*,
46
SkISize
size,
47
SkColor4f
color
,
48
bool
isProtected);
49
50
#ifdef SK_GRAPHITE
51
sk_sp<SkSurface>
CreateProtectedSkSurface
(
skgpu::graphite::Recorder
*,
52
SkISize
size,
53
skgpu::Protected
);
54
55
sk_sp<SkImage>
CreateProtectedSkImage
(
skgpu::graphite::Recorder
*,
56
SkISize
size,
57
SkColor4f
color
,
58
skgpu::Protected
);
59
#endif
60
61
}
// namespace ProtectedUtils
62
63
#endif
// ProtectedUtils_DEFINED
color
SkColor4f color
Definition
ImageShaderTest.cpp:28
SkColor.h
SkRefCnt.h
GrDirectContext
Definition
GrDirectContext.h:60
SkImage
Definition
SkImage.h:272
SkSurfaceProps
Definition
SkSurfaceProps.h:53
SkSurface
Definition
SkSurface.h:161
sk_sp
Definition
SkRefCnt.h:220
skgpu::graphite::Recorder
Definition
Recorder.h:74
ProtectedUtils
Definition
ProtectedUtils.cpp:16
ProtectedUtils::CreateProtectedSkSurface
sk_sp< SkSurface > CreateProtectedSkSurface(GrDirectContext *dContext, SkISize size, bool textureable, bool isProtected, const SkSurfaceProps *surfaceProps)
Definition
ProtectedUtils.cpp:18
ProtectedUtils::CreateProtectedSkImage
sk_sp< SkImage > CreateProtectedSkImage(GrDirectContext *dContext, SkISize size, SkColor4f color, bool isProtected)
Definition
ProtectedUtils.cpp:84
ProtectedUtils::CheckImageBEProtection
void CheckImageBEProtection(SkImage *image, bool expectingProtected)
Definition
ProtectedUtils.cpp:68
skgpu::graphite
Definition
BoundsManagerBench.cpp:27
skgpu
Definition
GpuTools.h:21
skgpu::Protected
Protected
Definition
GpuTypes.h:61
SkColor4f
SkISize
Definition
SkSize.h:16
Generated on Fri Apr 26 2024 06:18:11 for Flutter Engine by
1.9.8