Flutter Engine
The Flutter Engine
Functions
SkParseEncodedOrigin.h File Reference
#include <cstddef>
#include "include/codec/SkEncodedOrigin.h"

Go to the source code of this file.

Functions

bool SkParseEncodedOrigin (const void *data, size_t data_length, SkEncodedOrigin *out)
 

Function Documentation

◆ SkParseEncodedOrigin()

bool SkParseEncodedOrigin ( const void *  data,
size_t  data_length,
SkEncodedOrigin out 
)

If |data| is an EXIF tag representing an SkEncodedOrigin, return true and set |out| appropriately. Otherwise return false.

Definition at line 17 of file SkParseEncodedOrigin.cpp.

17 {
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
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