9 #ifndef SkBitmapDevice_DEFINED
10 #define SkBitmapDevice_DEFINED
16 #include "SkImageInfo.h"
20 #include "SkSurfaceProps.h"
24 class SkImageFilterCache;
62 bool onShouldDisableLCD(
const SkPaint&)
const override;
92 const SkMatrix* prePathMatrix = NULL,
93 bool pathIsMutable =
false)
override;
97 int x,
int y,
const SkPaint& paint)
override;
110 virtual void drawText(
const SkDraw&,
const void* text,
size_t len,
111 SkScalar x, SkScalar y,
const SkPaint& paint)
override;
112 virtual void drawPosText(
const SkDraw&,
const void* text,
size_t len,
113 const SkScalar pos[],
int scalarsPerPos,
115 virtual void drawVertices(
const SkDraw&, SkCanvas::VertexMode,
int vertexCount,
118 const uint16_t indices[],
int indexCount,
119 const SkPaint& paint)
override;
124 void drawSpecial(
const SkDraw&, SkSpecialImage*,
int x,
int y,
const SkPaint&)
override;
136 #ifdef SK_SUPPORT_LEGACY_ACCESSBITMAP
137 const SkBitmap& onAccessBitmap()
override;
142 SkPixelRef* getPixelRef()
const {
return fBitmap.pixelRef(); }
145 fBitmap.setPixelRef(pr);
151 bool onPeekPixels(
SkPixmap*)
override;
152 bool onAccessPixels(
SkPixmap*)
override;
156 friend struct DeviceCM;
158 friend class SkDrawIter;
159 friend class SkDeviceFilteredPaint;
161 friend class SkSurface_Raster;
166 void replaceBitmapBackendForRasterSurface(
const SkBitmap&)
override;
172 SkImageFilterCache* getImageFilterCache()
override;
176 void setNewSize(
const SkISize&);
181 #endif // SkBitmapDevice_DEFINED
A Canvas encapsulates all of the state about drawing into a device (bitmap).
Definition: SkCanvas.h:58
The SkRRect class represents a rounded rect with a potentially different radii for each corner...
Definition: SkRRect.h:48
The SkPath class encapsulates compound (multiple contour) geometric paths consisting of straight line...
Definition: SkPath.h:27
Describe an image's dimensions and pixel type.
Definition: SkImageInfo.h:181
virtual void drawDevice(const SkDraw &, SkBaseDevice *, int x, int y, const SkPaint &)=0
The SkDevice passed will be an SkDevice which was returned by a call to onCreateDevice on this device...
virtual void drawPath(const SkDraw &, const SkPath &path, const SkPaint &paint, const SkMatrix *prePathMatrix=NULL, bool pathIsMutable=false)=0
If pathIsMutable, then the implementation is allowed to cast path to a non-const pointer and modify i...
PointMode
Definition: SkCanvas.h:620
Describes properties and constraints of a given SkSurface.
Definition: SkSurfaceProps.h:51
Pairs SkImageInfo with actual pixels and rowbytes.
Definition: SkPixmap.h:23
Definition: SkPoint.h:156
Definition: SkDevice.h:297
The SkMatrix class holds a 3x3 matrix for transforming coordinates.
Definition: SkMatrix.h:26
SkSurface represents the backend/results of drawing to a canvas.
Definition: SkSurface.h:31
The SkPaint class holds the style and color information about how to draw geometries, text and bitmaps.
Definition: SkPaint.h:46
virtual SkBaseDevice * onCreateDevice(const CreateInfo &, const SkPaint *)
Create a new device based on CreateInfo.
Definition: SkDevice.h:335
virtual void drawPaint(const SkDraw &, const SkPaint &paint)=0
These are called inside the per-device-layer loop for each draw call.
SkXfermode is the base class for objects that are called to implement custom "transfer-modes" in the ...
Definition: SkXfermode.h:34
virtual void drawBitmapRect(const SkDraw &, const SkBitmap &, const SkRect *srcOrNull, const SkRect &dst, const SkPaint &paint, SkCanvas::SrcRectConstraint)=0
The default impl.
The SkBitmap class specifies a raster bitmap.
Definition: SkBitmap.h:41
Shared pointer class to wrap classes that support a ref()/unref() interface.
Definition: SkRefCnt.h:258
This class is the smart container for pixel memory, and is used with SkBitmap.
Definition: SkPixelRef.h:38
SrcRectConstraint
Controls the behavior at the edge of the src-rect, when specified in drawImageRect, trading off speed for exactness.
Definition: SkCanvas.h:796
virtual bool onReadPixels(const SkImageInfo &, void *, size_t, int x, int y)
The caller is responsible for "pre-clipping" the dst.
virtual bool onWritePixels(const SkImageInfo &, const void *, size_t, int x, int y)
The caller is responsible for "pre-clipping" the src.
uint32_t SkColor
32 bit ARGB color value, not premultiplied.
Definition: SkColor.h:28
Definition: SkDevice.h:28
virtual void drawText(const SkDraw &, const void *text, size_t len, SkScalar x, SkScalar y, const SkPaint &paint)=0
Does not handle text decoration.
SkImage is an abstraction for drawing a rectagle of pixels, though the particular type of image could...
Definition: SkImage.h:45
Types and macros for colors.
Definition: SkBitmapDevice.h:36