Flutter Engine
The Flutter Engine
Classes | Macros | Functions
SkBitmapDevice.cpp File Reference
#include "src/core/SkBitmapDevice.h"
#include "include/core/SkAlphaType.h"
#include "include/core/SkBlender.h"
#include "include/core/SkClipOp.h"
#include "include/core/SkColorType.h"
#include "include/core/SkImage.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkMatrix.h"
#include "include/core/SkPaint.h"
#include "include/core/SkPath.h"
#include "include/core/SkPixmap.h"
#include "include/core/SkPoint.h"
#include "include/core/SkRRect.h"
#include "include/core/SkRSXform.h"
#include "include/core/SkRasterHandleAllocator.h"
#include "include/core/SkRegion.h"
#include "include/core/SkScalar.h"
#include "include/core/SkShader.h"
#include "include/core/SkSurface.h"
#include "include/core/SkSurfaceProps.h"
#include "include/core/SkTileMode.h"
#include "include/private/base/SkAssert.h"
#include "include/private/base/SkTo.h"
#include "src/base/SkTLazy.h"
#include "src/core/SkDraw.h"
#include "src/core/SkImagePriv.h"
#include "src/core/SkMatrixPriv.h"
#include "src/core/SkRasterClip.h"
#include "src/core/SkSpecialImage.h"
#include "src/image/SkImage_Base.h"
#include "src/text/GlyphRun.h"
#include <utility>

Go to the source code of this file.

Classes

struct  Bounder
 
class  SkDrawTiler
 
class  SkBitmapDevice::BDDraw
 

Macros

#define LOOP_TILER(code, boundsPtr)
 

Functions

static bool valid_for_bitmap_device (const SkImageInfo &info, SkAlphaType *newAlphaType)
 
static bool CanApplyDstMatrixAsCTM (const SkMatrix &m, const SkPaint &paint)
 

Macro Definition Documentation

◆ LOOP_TILER

#define LOOP_TILER (   code,
  boundsPtr 
)
Value:
SkDrawTiler priv_tiler(this, boundsPtr); \
while (const SkDraw* priv_draw = priv_tiler.next()) { \
priv_draw->code; \
}
Definition: SkDraw.h:38

Definition at line 196 of file SkBitmapDevice.cpp.

Function Documentation

◆ CanApplyDstMatrixAsCTM()

static bool CanApplyDstMatrixAsCTM ( const SkMatrix m,
const SkPaint paint 
)
inlinestatic

Definition at line 405 of file SkBitmapDevice.cpp.

405 {
406 if (!paint.getMaskFilter()) {
407 return true;
408 }
409
410 // Some mask filters parameters (sigma) depend on the CTM/scale.
411 return m.getType() <= SkMatrix::kTranslate_Mask;
412}
@ kTranslate_Mask
translation SkMatrix
Definition: SkMatrix.h:193
const Paint & paint
Definition: color_source.cc:38

◆ valid_for_bitmap_device()

static bool valid_for_bitmap_device ( const SkImageInfo info,
SkAlphaType newAlphaType 
)
static

Definition at line 216 of file SkBitmapDevice.cpp.

217 {
218 if (info.width() < 0 || info.height() < 0 || kUnknown_SkColorType == info.colorType()) {
219 return false;
220 }
221
222 if (newAlphaType) {
223 *newAlphaType = SkColorTypeIsAlwaysOpaque(info.colorType()) ? kOpaque_SkAlphaType
224 : info.alphaType();
225 }
226
227 return true;
228}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition: DM.cpp:213
@ kOpaque_SkAlphaType
pixel is opaque
Definition: SkAlphaType.h:28
@ kUnknown_SkColorType
uninitialized
Definition: SkColorType.h:20
SK_API bool SkColorTypeIsAlwaysOpaque(SkColorType ct)
Definition: SkImageInfo.cpp:48