Flutter Engine
The Flutter Engine
third_party
skia
src
codec
SkEncodedInfo.cpp
Go to the documentation of this file.
1
/*
2
* Copyright 2018 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
#include "
include/private/SkEncodedInfo.h
"
9
10
#include "
modules/skcms/skcms.h
"
11
12
std::unique_ptr<SkEncodedInfo::ICCProfile>
SkEncodedInfo::ICCProfile::Make
(
sk_sp<SkData>
data
) {
13
if
(
data
) {
14
skcms_ICCProfile
profile
;
15
if
(
skcms_Parse
(
data
->
data
(),
data
->
size
(), &
profile
)) {
16
return
std::unique_ptr<ICCProfile>(
new
ICCProfile
(
profile
, std::move(
data
)));
17
}
18
}
19
return
nullptr
;
20
}
21
22
std::unique_ptr<SkEncodedInfo::ICCProfile>
SkEncodedInfo::ICCProfile::Make
(
23
const
skcms_ICCProfile
&
profile
) {
24
return
std::unique_ptr<ICCProfile>(
new
ICCProfile
(
profile
));
25
}
26
27
SkEncodedInfo::ICCProfile::ICCProfile(
const
skcms_ICCProfile
&
profile
,
sk_sp<SkData>
data
)
28
: fProfile(
profile
)
29
, fData(
std
::move(
data
))
30
{}
SkEncodedInfo.h
SkData::data
const void * data() const
Definition:
SkData.h:37
SkData::size
size_t size() const
Definition:
SkData.h:30
SkEncodedInfo::ICCProfile
Definition:
SkEncodedInfo.h:27
SkEncodedInfo::ICCProfile::profile
const skcms_ICCProfile * profile() const
Definition:
SkEncodedInfo.h:32
SkEncodedInfo::ICCProfile::data
sk_sp< SkData > data() const
Definition:
SkEncodedInfo.h:33
SkEncodedInfo::ICCProfile::Make
static std::unique_ptr< ICCProfile > Make(sk_sp< SkData >)
Definition:
SkEncodedInfo.cpp:12
sk_sp< SkData >
std
Definition:
ref_ptr.h:256
skcms.h
skcms_Parse
static bool skcms_Parse(const void *buf, size_t len, skcms_ICCProfile *profile)
Definition:
skcms_public.h:245
SkEncodedInfo::profile
const skcms_ICCProfile * profile() const
Definition:
SkEncodedInfo.h:203
skcms_ICCProfile
Definition:
skcms_public.h:173
data
std::shared_ptr< const fml::Mapping > data
Definition:
texture_gles.cc:63
Generated on Sun Jun 23 2024 21:56:09 for Flutter Engine by
1.9.4