Flutter Engine
The Flutter Engine
third_party
skia
src
gpu
DataUtils.h
Go to the documentation of this file.
1
/*
2
* Copyright 2024 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 skgpu_DataUtils_DEFINED
9
#define skgpu_DataUtils_DEFINED
10
11
#include "
include/core/SkColor.h
"
12
#include "
include/core/SkSize.h
"
13
14
#include <cstddef>
15
16
enum class
SkTextureCompressionType
;
17
18
namespace
skgpu
{
19
20
enum class
Mipmapped
: bool;
21
22
size_t
NumCompressedBlocks
(
SkTextureCompressionType
,
SkISize
baseDimensions);
23
24
// Returns a value that can be used to set rowBytes for a transfer function.
25
size_t
CompressedRowBytes
(
SkTextureCompressionType
,
int
w
);
26
27
// Return the pixel dimensions of a compressed texture. The topmost levels
28
// of a compressed mipmapped texture (i.e., 1x1 or 2x2) still occupy a full
29
// block and thus objectively take up more pixels (e.g., 4x4 pixels for ETC1).
30
SkISize
CompressedDimensions
(
SkTextureCompressionType
,
SkISize
baseDimensions);
31
32
SkISize
CompressedDimensionsInBlocks
(
SkTextureCompressionType
,
SkISize
baseDimensions);
33
34
void
FillInCompressedData
(
SkTextureCompressionType
,
35
SkISize
dimensions,
36
skgpu::Mipmapped
,
37
char
*
dest
,
38
const
SkColor4f
&
color
);
39
40
}
// namespace skgpu
41
42
#endif
// skgpu_DataUtils_DEFINED
SkColor.h
SkSize.h
SkTextureCompressionType
SkTextureCompressionType
Definition:
SkTextureCompressionType.h:20
color
DlColor color
Definition:
dl_golden_blur_unittests.cc:23
skgpu
Definition:
GpuTools.h:21
skgpu::FillInCompressedData
void FillInCompressedData(SkTextureCompressionType type, SkISize dimensions, skgpu::Mipmapped mipmapped, char *dstPixels, const SkColor4f &colorf)
Definition:
DataUtils.cpp:257
skgpu::CompressedDimensionsInBlocks
SkISize CompressedDimensionsInBlocks(SkTextureCompressionType type, SkISize baseDimensions)
Definition:
DataUtils.cpp:210
skgpu::CompressedRowBytes
size_t CompressedRowBytes(SkTextureCompressionType type, int width)
Definition:
DataUtils.cpp:179
skgpu::Mipmapped
Mipmapped
Definition:
GpuTypes.h:53
skgpu::NumCompressedBlocks
size_t NumCompressedBlocks(SkTextureCompressionType type, SkISize baseDimensions)
Definition:
DataUtils.cpp:163
skgpu::CompressedDimensions
SkISize CompressedDimensions(SkTextureCompressionType type, SkISize baseDimensions)
Definition:
DataUtils.cpp:195
zip.dest
dest
Definition:
zip.py:79
w
SkScalar w
Definition:
pictureshadertile.cpp:30
SkColor4f
SkISize
Definition:
SkSize.h:16
Generated on Sun Jun 23 2024 21:56:17 for Flutter Engine by
1.9.4