Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
tools
gpu
vk
VkYcbcrSamplerHelper.h
Go to the documentation of this file.
1
/*
2
* Copyright 2020 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 VkYcbcrSamplerHelper_DEFINED
9
#define VkYcbcrSamplerHelper_DEFINED
10
11
#include "
include/core/SkTypes.h
"
12
13
#ifdef SK_VULKAN
14
15
#include "
include/gpu/GrBackendSurface.h
"
16
#include "
include/gpu/vk/GrVkTypes.h
"
17
18
class
GrDirectContext
;
19
class
GrVkGpu
;
20
21
// This helper will create and hold data for a Vulkan YCbCr backend texture. This format is
22
// particularly interesting because its sampler is immutable.
23
class
VkYcbcrSamplerHelper {
24
public
:
25
VkYcbcrSamplerHelper(
GrDirectContext
*);
26
~VkYcbcrSamplerHelper();
27
28
bool
isYCbCrSupported();
29
30
bool
createBackendTexture(uint32_t
width
, uint32_t
height
);
31
32
const
GrBackendTexture
& backendTexture()
const
{
return
fTexture; }
33
34
static
int
GetExpectedY(
int
x
,
int
y
,
int
width
,
int
height
);
35
static
std::pair<int, int> GetExpectedUV(
int
x
,
int
y
,
int
width
,
int
height
);
36
37
private
:
38
GrVkGpu
* vkGpu();
39
40
GrDirectContext
*
fDContext
;
41
42
VkImage fImage =
VK_NULL_HANDLE
;
43
VkDeviceMemory fImageMemory =
VK_NULL_HANDLE
;
44
GrBackendTexture
fTexture;
45
};
46
47
#endif
// SK_VULKAN
48
49
#endif
// VkYcbcrSamplerHelper_DEFINED
GrBackendSurface.h
GrVkTypes.h
SkTypes.h
fDContext
GrDirectContext * fDContext
Definition
SkiaMetalContext.mm:32
GrBackendTexture
Definition
GrBackendSurface.h:149
GrDirectContext
Definition
GrDirectContext.h:60
GrVkGpu
Definition
GrVkGpu.h:42
y
double y
Definition
mouse-input-test.cc:83
x
double x
Definition
mouse-input-test.cc:82
height
int32_t height
Definition
serialization_callbacks.cc:1
width
int32_t width
Definition
serialization_callbacks.cc:0
VK_NULL_HANDLE
#define VK_NULL_HANDLE
Definition
vulkan_core.h:46
Generated on Fri Apr 26 2024 06:18:11 for Flutter Engine by
1.9.8