Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
SkBitmapProcState Struct Reference

#include <SkBitmapProcState.h>

Public Types

typedef void(* ShaderProc32) (const void *ctx, int x, int y, SkPMColor[], int count)
 
typedef void(* MatrixProc) (const SkBitmapProcState &, uint32_t bitmapXY[], int count, int x, int y)
 
typedef void(* SampleProc32) (const SkBitmapProcState &, const uint32_t[], int count, SkPMColor colors[])
 

Public Member Functions

 SkBitmapProcState (const SkImage_Base *image, SkTileMode tmx, SkTileMode tmy)
 
bool setup (const SkMatrix &inv, SkColor color, const SkSamplingOptions &sampling)
 
int maxCountForBufferSize (size_t bufferSize) const
 
ShaderProc32 getShaderProc32 () const
 
MatrixProc getMatrixProc () const
 
SampleProc32 getSampleProc32 () const
 

Public Attributes

const SkImage_BasefImage
 
SkPixmap fPixmap
 
SkMatrix fInvMatrix
 
SkAlpha fPaintAlpha
 
SkTileMode fTileModeX
 
SkTileMode fTileModeY
 
bool fBilerp
 
SkMatrixPriv::MapXYProc fInvProc
 
SkFractionalInt fInvSxFractionalInt
 
SkFractionalInt fInvKyFractionalInt
 
SkFixed fFilterOneX
 
SkFixed fFilterOneY
 
uint16_t fAlphaScale
 

Detailed Description

Definition at line 35 of file SkBitmapProcState.h.

Member Typedef Documentation

◆ MatrixProc

typedef void(* SkBitmapProcState::MatrixProc) (const SkBitmapProcState &, uint32_t bitmapXY[], int count, int x, int y)

Definition at line 45 of file SkBitmapProcState.h.

◆ SampleProc32

typedef void(* SkBitmapProcState::SampleProc32) (const SkBitmapProcState &, const uint32_t[], int count, SkPMColor colors[])

Definition at line 50 of file SkBitmapProcState.h.

◆ ShaderProc32

typedef void(* SkBitmapProcState::ShaderProc32) (const void *ctx, int x, int y, SkPMColor[], int count)

Definition at line 43 of file SkBitmapProcState.h.

Constructor & Destructor Documentation

◆ SkBitmapProcState()

SkBitmapProcState::SkBitmapProcState ( const SkImage_Base image,
SkTileMode  tmx,
SkTileMode  tmy 
)

Definition at line 147 of file SkBitmapProcState.cpp.

148 : fImage(image)
149 , fTileModeX(tmx)
150 , fTileModeY(tmy)
151{}
sk_sp< SkImage > image
Definition examples.cpp:29
SkTileMode tmy
SkTileMode tmx
const SkImage_Base * fImage

Member Function Documentation

◆ getMatrixProc()

MatrixProc SkBitmapProcState::getMatrixProc ( ) const
inline

Definition at line 91 of file SkBitmapProcState.h.

91{ return fMatrixProc; }

◆ getSampleProc32()

SampleProc32 SkBitmapProcState::getSampleProc32 ( ) const
inline

Definition at line 93 of file SkBitmapProcState.h.

93{ return fSampleProc32; }

◆ getShaderProc32()

ShaderProc32 SkBitmapProcState::getShaderProc32 ( ) const
inline

Definition at line 86 of file SkBitmapProcState.h.

86{ return fShaderProc32; }

◆ maxCountForBufferSize()

int SkBitmapProcState::maxCountForBufferSize ( size_t  bufferSize) const

Given the byte size of the index buffer to be passed to the matrix proc, return the maximum number of resulting pixels that can be computed (i.e. the number of SkPMColor values to be written by the sample proc). This routine takes into account that filtering and scale-vs-affine affect the amount of buffer space needed.

Only valid to call after chooseProcs (setContext) has been called. It is safe to call this inside the shader's shadeSpan() method.

Definition at line 679 of file SkBitmapProcState.cpp.

679 {
680 int32_t size = static_cast<int32_t>(bufferSize);
681
682 size &= ~3; // only care about 4-byte aligned chunks
684 size -= 4; // the shared Y (or YY) coordinate
685 if (size < 0) {
686 size = 0;
687 }
688 size >>= 1;
689 } else {
690 size >>= 2;
691 }
692
693 if (fBilerp) {
694 size >>= 1;
695 }
696
697 return size;
698}
bool isScaleTranslate() const
Definition SkMatrix.h:236
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition switches.h:259

◆ setup()

bool SkBitmapProcState::setup ( const SkMatrix inv,
SkColor  color,
const SkSamplingOptions sampling 
)
inline

Definition at line 38 of file SkBitmapProcState.h.

38 {
39 return this->init(inv, color, sampling)
40 && this->chooseProcs();
41 }
static SkM44 inv(const SkM44 &m)
Definition 3d.cpp:26
SkColor4f color

Member Data Documentation

◆ fAlphaScale

uint16_t SkBitmapProcState::fAlphaScale

Definition at line 71 of file SkBitmapProcState.h.

◆ fBilerp

bool SkBitmapProcState::fBilerp

Definition at line 62 of file SkBitmapProcState.h.

◆ fFilterOneX

SkFixed SkBitmapProcState::fFilterOneX

Definition at line 68 of file SkBitmapProcState.h.

◆ fFilterOneY

SkFixed SkBitmapProcState::fFilterOneY

Definition at line 69 of file SkBitmapProcState.h.

◆ fImage

const SkImage_Base* SkBitmapProcState::fImage

Definition at line 55 of file SkBitmapProcState.h.

◆ fInvKyFractionalInt

SkFractionalInt SkBitmapProcState::fInvKyFractionalInt

Definition at line 66 of file SkBitmapProcState.h.

◆ fInvMatrix

SkMatrix SkBitmapProcState::fInvMatrix

Definition at line 58 of file SkBitmapProcState.h.

◆ fInvProc

SkMatrixPriv::MapXYProc SkBitmapProcState::fInvProc

Definition at line 64 of file SkBitmapProcState.h.

◆ fInvSxFractionalInt

SkFractionalInt SkBitmapProcState::fInvSxFractionalInt

Definition at line 65 of file SkBitmapProcState.h.

◆ fPaintAlpha

SkAlpha SkBitmapProcState::fPaintAlpha

Definition at line 59 of file SkBitmapProcState.h.

◆ fPixmap

SkPixmap SkBitmapProcState::fPixmap

Definition at line 57 of file SkBitmapProcState.h.

◆ fTileModeX

SkTileMode SkBitmapProcState::fTileModeX

Definition at line 60 of file SkBitmapProcState.h.

◆ fTileModeY

SkTileMode SkBitmapProcState::fTileModeY

Definition at line 61 of file SkBitmapProcState.h.


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