Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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
12#include "include/core/SkSize.h"
13
14#include <cstddef>
15
17
18namespace skgpu {
19
20enum class Mipmapped : bool;
21
23
24// Returns a value that can be used to set rowBytes for a transfer function.
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).
31
33
35 SkISize dimensions,
37 char* dest,
38 const SkColor4f& color);
39
40} // namespace skgpu
41
42#endif // skgpu_DataUtils_DEFINED
SkColor4f color
void FillInCompressedData(SkTextureCompressionType type, SkISize dimensions, skgpu::Mipmapped mipmapped, char *dstPixels, const SkColor4f &colorf)
SkISize CompressedDimensionsInBlocks(SkTextureCompressionType type, SkISize baseDimensions)
size_t CompressedRowBytes(SkTextureCompressionType type, int width)
Mipmapped
Definition GpuTypes.h:53
size_t NumCompressedBlocks(SkTextureCompressionType type, SkISize baseDimensions)
SkISize CompressedDimensions(SkTextureCompressionType type, SkISize baseDimensions)
SkScalar w