Flutter Engine
The Flutter Engine
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
9
10#include "include/core/SkData.h"
14
15#include <optional>
16
17bool SkParseEncodedOrigin(const void* data, size_t data_length, SkEncodedOrigin* orientation) {
18 SkASSERT(orientation);
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}
#define SkASSERT(cond)
Definition: SkAssert.h:116
SkEncodedOrigin
bool SkParseEncodedOrigin(const void *data, size_t data_length, SkEncodedOrigin *orientation)
static sk_sp< SkData > MakeWithoutCopy(const void *data, size_t length)
Definition: SkData.h:116
void SK_API Parse(Metadata &metadata, const SkData *data)
Definition: SkExif.cpp:182
const myers::Point & get(const myers::Segment &)
std::optional< SkEncodedOrigin > fOrigin
Definition: SkExif.h:31
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:63