Flutter Engine
The Flutter Engine
SkNDKConversions.h
Go to the documentation of this file.
1/*
2 * Copyright 2020 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 SkNDKConversions_DEFINED
9#define SkNDKConversions_DEFINED
10
13
14#include <android/bitmap.h>
15#include <android/data_space.h>
16
17namespace SkNDKConversions {
18 // Supports a small subset of SkColorType. Others are treated as
19 // ANDROID_BITMAP_FORMAT_NONE.
20 AndroidBitmapFormat toAndroidBitmapFormat(SkColorType);
21
22 SkColorType toColorType(AndroidBitmapFormat);
23
24 // Treats null as ADATASPACE_SRGB.
25 ADataSpace toDataSpace(SkColorSpace*);
26
27 // Treats ADATASPACE_UNKNOWN as nullptr.
29}
30
31#endif // SkNDKConversions_DEFINED
SkColorType
Definition: SkColorType.h:19
AndroidBitmapFormat toAndroidBitmapFormat(SkColorType colorType)
ADataSpace toDataSpace(SkColorSpace *cs)
SkColorType toColorType(AndroidBitmapFormat format)
sk_sp< SkColorSpace > toColorSpace(ADataSpace dataSpace)