Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
CodecBenchPriv.h
Go to the documentation of this file.
1/*
2 * Copyright 2015 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 CodecBenchPriv_DEFINED
9#define CodecBenchPriv_DEFINED
10
12
14 switch (colorType) {
15 case kN32_SkColorType:
16 return "N32";
18 return "565";
20 return "Gray8";
22 return "Alpha8";
23 default:
24 return "Unknown";
25 }
26}
27
28inline const char* alpha_type_to_str(SkAlphaType alphaType) {
29 switch (alphaType) {
31 return "";
33 return "Premul";
35 return "Unpremul";
36 default:
37 SkASSERT(false);
38 return "Unknown";
39 }
40}
41
42#endif // CodecBenchPriv_DEFINED
const char * alpha_type_to_str(SkAlphaType alphaType)
const char * color_type_to_str(SkColorType colorType)
kUnpremul_SkAlphaType
SkAlphaType
Definition SkAlphaType.h:26
@ kOpaque_SkAlphaType
pixel is opaque
Definition SkAlphaType.h:28
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
Definition SkAlphaType.h:29
#define SkASSERT(cond)
Definition SkAssert.h:116
SkColorType
Definition SkColorType.h:19
@ kAlpha_8_SkColorType
pixel with alpha in 8-bit byte
Definition SkColorType.h:21
@ kGray_8_SkColorType
pixel with grayscale level in 8-bit byte
Definition SkColorType.h:35
@ kRGB_565_SkColorType
pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word
Definition SkColorType.h:22
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)