Flutter Engine
The Flutter Engine
third_party
skia
src
codec
SkParseEncodedOrigin.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 "
src/codec/SkParseEncodedOrigin.h
"
9
10
#include "
include/core/SkData.h
"
11
#include "
include/core/SkRefCnt.h
"
12
#include "
include/private/SkExif.h
"
13
#include "
include/private/base/SkAssert.h
"
14
15
#include <optional>
16
17
bool
SkParseEncodedOrigin
(
const
void
*
data
,
size_t
data_length,
SkEncodedOrigin
* orientation) {
18
SkASSERT
(orientation);
19
SkExif::Metadata
exif;
20
SkExif::Parse
(exif,
SkData::MakeWithoutCopy
(
data
, data_length).
get
());
21
if
(exif.
fOrigin
.has_value()) {
22
*orientation = exif.
fOrigin
.value();
23
return
true
;
24
}
25
return
false
;
26
}
SkAssert.h
SkASSERT
#define SkASSERT(cond)
Definition:
SkAssert.h:116
SkData.h
SkEncodedOrigin
SkEncodedOrigin
Definition:
SkEncodedOrigin.h:14
SkExif.h
SkParseEncodedOrigin
bool SkParseEncodedOrigin(const void *data, size_t data_length, SkEncodedOrigin *orientation)
Definition:
SkParseEncodedOrigin.cpp:17
SkParseEncodedOrigin.h
SkRefCnt.h
SkData::MakeWithoutCopy
static sk_sp< SkData > MakeWithoutCopy(const void *data, size_t length)
Definition:
SkData.h:116
SkExif::Parse
void SK_API Parse(Metadata &metadata, const SkData *data)
Definition:
SkExif.cpp:182
myers::get
const myers::Point & get(const myers::Segment &)
SkExif::Metadata
Definition:
SkExif.h:29
SkExif::Metadata::fOrigin
std::optional< SkEncodedOrigin > fOrigin
Definition:
SkExif.h:31
data
std::shared_ptr< const fml::Mapping > data
Definition:
texture_gles.cc:63
Generated on Sun Jun 23 2024 21:56:10 for Flutter Engine by
1.9.4