Flutter Engine
The Flutter Engine
Classes | Namespaces | Macros | Functions
SkHeifCodec.cpp File Reference
#include "src/codec/SkHeifCodec.h"
#include "include/codec/SkCodec.h"
#include "include/codec/SkEncodedImageFormat.h"
#include "include/core/SkStream.h"
#include "include/core/SkTypes.h"
#include "include/private/SkColorData.h"
#include "include/private/base/SkTemplates.h"
#include "src/base/SkEndian.h"
#include "src/codec/SkCodecPriv.h"

Go to the source code of this file.

Classes

struct  SkHeifStreamWrapper
 

Namespaces

namespace  SkHeifDecoder
 

Macros

#define FOURCC(c1, c2, c3, c4)    ((c1) << 24 | (c2) << 16 | (c3) << 8 | (c4))
 

Functions

static SkEncodedOrigin get_orientation (const HeifFrameInfo &frameInfo)
 
static void releaseProc (const void *ptr, void *context)
 
SK_API bool SkHeifDecoder::IsHeif (const void *, size_t)
 
SK_API std::unique_ptr< SkCodecSkHeifDecoder::Decode (std::unique_ptr< SkStream >, SkCodec::Result *, SkCodecs::DecodeContext=nullptr)
 
SK_API std::unique_ptr< SkCodecSkHeifDecoder::Decode (sk_sp< SkData >, SkCodec::Result *, SkCodecs::DecodeContext=nullptr)
 

Macro Definition Documentation

◆ FOURCC

#define FOURCC (   c1,
  c2,
  c3,
  c4 
)     ((c1) << 24 | (c2) << 16 | (c3) << 8 | (c4))

Definition at line 18 of file SkHeifCodec.cpp.

Function Documentation

◆ get_orientation()

static SkEncodedOrigin get_orientation ( const HeifFrameInfo frameInfo)
static

Definition at line 102 of file SkHeifCodec.cpp.

102 {
103 switch (frameInfo.mRotationAngle) {
104 case 0: return kTopLeft_SkEncodedOrigin;
105 case 90: return kRightTop_SkEncodedOrigin;
106 case 180: return kBottomRight_SkEncodedOrigin;
107 case 270: return kLeftBottom_SkEncodedOrigin;
108 }
110}
@ kBottomRight_SkEncodedOrigin
@ kTopLeft_SkEncodedOrigin
@ kLeftBottom_SkEncodedOrigin
@ kDefault_SkEncodedOrigin
@ kRightTop_SkEncodedOrigin

◆ releaseProc()

static void releaseProc ( const void *  ptr,
void *  context 
)
static

Definition at line 141 of file SkHeifCodec.cpp.

141 {
142 delete reinterpret_cast<std::vector<uint8_t>*>(context);
143}