Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
Vertish_SkAntiHairBlitter Class Reference
Inheritance diagram for Vertish_SkAntiHairBlitter:
SkAntiHairBlitter

Public Member Functions

SkFixed drawCap (int y, SkFixed fx, SkFixed dx, int mod64) override
 
SkFixed drawLine (int y, int stopy, SkFixed fx, SkFixed dx) override
 
- Public Member Functions inherited from SkAntiHairBlitter
 SkAntiHairBlitter ()
 
virtual ~SkAntiHairBlitter ()
 
SkBlittergetBlitter () const
 
void setup (SkBlitter *blitter)
 
virtual SkFixed drawCap (int x, SkFixed fy, SkFixed slope, int mod64)=0
 
virtual SkFixed drawLine (int x, int stopx, SkFixed fy, SkFixed slope)=0
 

Detailed Description

Definition at line 242 of file SkScan_Antihair.cpp.

Member Function Documentation

◆ drawCap()

SkFixed Vertish_SkAntiHairBlitter::drawCap ( int  y,
SkFixed  fx,
SkFixed  dx,
int  mod64 
)
inlineoverridevirtual

Implements SkAntiHairBlitter.

Definition at line 244 of file SkScan_Antihair.cpp.

244 {
245 fx += SK_Fixed1/2;
246
247 int x = fx >> 16;
248 uint8_t a = (uint8_t)((fx >> 8) & 0xFF);
249 this->getBlitter()->blitAntiH2(x - 1, y,
250 SmallDot6Scale(255 - a, mod64), SmallDot6Scale(a, mod64));
251
252 return fx + dx - SK_Fixed1/2;
253 }
#define SK_Fixed1
Definition: SkFixed.h:26
static int SmallDot6Scale(int value, int dot6)
SkBlitter * getBlitter() const
virtual void blitAntiH2(int x, int y, U8CPU a0, U8CPU a1)
Definition: SkBlitter.h:81
struct MyStruct a[10]
double y
double x
skia_private::AutoTArray< sk_sp< SkImageFilter > > filters TypedMatrix matrix TypedMatrix matrix SkScalar dx
Definition: SkRecords.h:208

◆ drawLine()

SkFixed Vertish_SkAntiHairBlitter::drawLine ( int  y,
int  stopy,
SkFixed  fx,
SkFixed  dx 
)
inlineoverridevirtual

Implements SkAntiHairBlitter.

Definition at line 255 of file SkScan_Antihair.cpp.

255 {
256 SkASSERT(y < stopy);
257 fx += SK_Fixed1/2;
258 do {
259 int x = fx >> 16;
260 uint8_t a = (uint8_t)((fx >> 8) & 0xFF);
261 this->getBlitter()->blitAntiH2(x - 1, y, 255 - a, a);
262 fx += dx;
263 } while (++y < stopy);
264
265 return fx - SK_Fixed1/2;
266 }
#define SkASSERT(cond)
Definition: SkAssert.h:116

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