Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
SkMask::AlphaIter< SkMask::kLCD16_Format > Struct Reference

#include <SkMask.h>

Public Member Functions

 AlphaIter (const uint16_t *ptr)
 
 AlphaIter (const AlphaIter &that)
 
AlphaIteroperator++ ()
 
AlphaIteroperator-- ()
 
AlphaIteroperator>>= (uint32_t rb)
 
uint8_t operator* () const
 
bool operator< (const AlphaIter &that) const
 

Public Attributes

const uint16_t * fPtr
 

Detailed Description

Definition at line 197 of file SkMask.h.

Constructor & Destructor Documentation

◆ AlphaIter() [1/2]

SkMask::AlphaIter< SkMask::kLCD16_Format >::AlphaIter ( const uint16_t *  ptr)
inline

Definition at line 198 of file SkMask.h.

198: fPtr(ptr) {}

◆ AlphaIter() [2/2]

SkMask::AlphaIter< SkMask::kLCD16_Format >::AlphaIter ( const AlphaIter< SkMask::kLCD16_Format > &  that)
inline

Definition at line 199 of file SkMask.h.

199: fPtr(that.fPtr) {}

Member Function Documentation

◆ operator*()

uint8_t SkMask::AlphaIter< SkMask::kLCD16_Format >::operator* ( ) const
inline

Definition at line 206 of file SkMask.h.

206 {
207 unsigned packed = *fPtr;
208 unsigned r = SkPacked16ToR32(packed);
209 unsigned g = SkPacked16ToG32(packed);
210 unsigned b = SkPacked16ToB32(packed);
211 return (r + g + b) / 3;
212 }
#define SkPacked16ToG32(c)
Definition: SkColorData.h:47
#define SkPacked16ToR32(c)
Definition: SkColorData.h:46
#define SkPacked16ToB32(c)
Definition: SkColorData.h:48
static bool b

◆ operator++()

AlphaIter & SkMask::AlphaIter< SkMask::kLCD16_Format >::operator++ ( )
inline

Definition at line 200 of file SkMask.h.

200{ ++fPtr; return *this; }

◆ operator--()

AlphaIter & SkMask::AlphaIter< SkMask::kLCD16_Format >::operator-- ( )
inline

Definition at line 201 of file SkMask.h.

201{ --fPtr; return *this; }

◆ operator<()

bool SkMask::AlphaIter< SkMask::kLCD16_Format >::operator< ( const AlphaIter< SkMask::kLCD16_Format > &  that) const
inline

Definition at line 213 of file SkMask.h.

213{ return fPtr < that.fPtr; }

◆ operator>>=()

AlphaIter & SkMask::AlphaIter< SkMask::kLCD16_Format >::operator>>= ( uint32_t  rb)
inline

Definition at line 202 of file SkMask.h.

202 {
203 fPtr = SkTAddOffset<const uint16_t>(fPtr, rb);
204 return *this;
205 }

Member Data Documentation

◆ fPtr

const uint16_t* SkMask::AlphaIter< SkMask::kLCD16_Format >::fPtr

Definition at line 214 of file SkMask.h.


The documentation for this struct was generated from the following file: