Flutter Engine
The Flutter Engine
SkCompressedDataUtils.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 SkCompressedDataUtils_DEFINED
9#define SkCompressedDataUtils_DEFINED
10
15
16#include <cstddef>
17
18class SkBitmap;
19class SkData;
20struct SkISize;
21
23 switch (compression) {
24 case SkTextureCompressionType::kNone: return true;
28 }
29
31}
32
34 skia_private::TArray<size_t>* individualMipOffsets, bool mipmapped);
36
37/**
38 * Returns the data size for the given SkTextureCompressionType
39 */
41 SkISize dimensions, bool mipmapped);
42
43 /*
44 * This method will decompress the bottommost level in 'data' into 'dst'.
45 */
47 SkISize dimensions,
48 SkTextureCompressionType compressionType,
49 SkBitmap* dst);
50
51#endif
#define SkUNREACHABLE
Definition: SkAssert.h:135
bool SkDecompress(sk_sp< SkData > data, SkISize dimensions, SkTextureCompressionType compressionType, SkBitmap *dst)
static constexpr bool SkTextureCompressionTypeIsOpaque(SkTextureCompressionType compression)
size_t SkCompressedFormatDataSize(SkTextureCompressionType compressionType, SkISize dimensions, bool mipmapped)
size_t SkCompressedDataSize(SkTextureCompressionType, SkISize baseDimensions, skia_private::TArray< size_t > *individualMipOffsets, bool mipmapped)
size_t SkCompressedBlockSize(SkTextureCompressionType type)
SkTextureCompressionType
GLenum type
Definition: SkData.h:25
dst
Definition: cp.py:12
Definition: SkSize.h:16
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:63