Home | History | Annotate | Download | only in core

Lines Matching defs:SkBitmap

24 /** \class SkBitmap
25 SkBitmap describes a two-dimensional raster pixel array. SkBitmap is built on
28 SkBitmap points to SkPixelRef, which describes the physical array of pixels.
31 SkBitmap can be drawn using SkCanvas. SkBitmap can be a drawing destination for SkCanvas
32 draw methods. SkBitmap flexibility as a pixel container limits some optimizations
38 Declaring SkBitmap const prevents altering SkImageInfo: the SkBitmap height, width,
40 pixels. Declaring SkBitmap const affects SkBitmap configuration, not its contents.
42 SkBitmap is not thread safe. Each thread must have its own copy of SkBitmap fields,
45 class SK_API SkBitmap {
49 /** Creates an empty SkBitmap without pixels, with kUnknown_SkColorType,
51 set to (0, 0). SkBitmap is not volatile.
54 after SkBitmap has been created.
56 @return empty SkBitmap
58 SkBitmap();
60 /** Copies settings from src to returned SkBitmap. Shares pixels if src has pixels
63 @param src SkBitmap to copy SkImageInfo, and share SkPixelRef
66 SkBitmap(const SkBitmap& src);
68 /** Copies settings from src to returned SkBitmap. Moves ownership of src pixels to
69 SkBitmap.
71 @param src SkBitmap to copy SkImageInfo, and reassign SkPixelRef
74 SkBitmap(SkBitmap&& src);
78 ~SkBitmap();
80 /** Copies settings from src to returned SkBitmap. Shares pixels if src has pixels
83 @param src SkBitmap to copy SkImageInfo, and share SkPixelRef
86 SkBitmap& operator=(const SkBitmap& src);
88 /** Copies settings from src to returned SkBitmap. Moves ownership of src pixels to
89 SkBitmap.
91 @param src SkBitmap to copy SkImageInfo, and reassign SkPixelRef
94 SkBitmap& operator=(SkBitmap&& src);
98 @param other SkBitmap exchanged with original
100 void swap(SkBitmap& other);
102 /** Returns a constant reference to the SkPixmap holding the SkBitmap pixel
105 @return reference to SkPixmap describing this SkBitmap.
207 If true, SkBitmap has no effect when drawn or drawn into.
272 Most immutable SkBitmap checks trigger an assert only on debug builds.
278 /** Sets internal flag to mark SkBitmap as immutable. Once set, pixels can not change.
282 Writing to immutable SkBitmap pixels triggers an assert on debug builds.
305 /** Sets if pixels should be read from SkPixelRef on every access. SkBitmap are not
307 accessed repeatedly. Marking temporary SkBitmap as volatile provides a hint to
308 SkBaseDevice that the SkBitmap pixels should not be cached. This can
316 /** Resets to its initial state; all fields are set to zero, as if SkBitmap had
317 been initialized by SkBitmap().
323 its memory if SkBitmap is the sole owner.
341 @param bm SkBitmap to check
344 static bool ComputeIsOpaque(const SkBitmap& bm) {
411 /** \enum SkBitmap::AllocFlags
547 Use to create SkBitmap that matches SkPMColor, the native pixel arrangement on
548 the platform. SkBitmap drawn to output device skips converting its pixel format.
569 Use to create SkBitmap that matches SkPMColor, the native pixel arrangement on
570 the platform. SkBitmap drawn to output device skips converting its pixel format.
615 Caller must ensure that pixels are valid for the lifetime of SkBitmap and SkPixelRef.
634 Caller must ensure that pixmap is valid for the lifetime of SkBitmap and SkPixelRef.
648 Caller must ensure that mask is valid for the lifetime of SkBitmap and SkPixelRef.
662 of SkBitmap and SkPixelRef.
696 @param allocator instance of SkBitmap::Allocator instantiation
708 @param allocator instance of SkBitmap::Allocator instantiation
723 /** Returns origin of pixels within SkPixelRef. SkBitmap bounds is always contained
724 by SkPixelRef bounds, which may be the same size or larger. Multiple SkBitmap
725 can share the same SkPixelRef, where each SkBitmap has different bounds.
727 The returned origin added to SkBitmap dimensions equals or is smaller than the
736 /** Replaces pixelRef and origin in SkBitmap. dx and dy specify the offset
751 /** Returns true if SkBitmap is can be drawn.
904 /** Shares SkPixelRef with dst. Pixels are not copied; SkBitmap and dst point
918 @param dst SkBitmap set to subset
922 bool extractSubset(SkBitmap* dst, const SkIRect& subset) const;
1072 @return true if src pixels are copied to SkBitmap
1096 @return true if src pixels are copied to SkBitmap
1130 @return true if src pixels are copied to SkBitmap
1164 bool extractAlpha(SkBitmap* dst) const {
1172 generates mask alpha from SkBitmap. Uses HeapAllocator to reserve memory for dst
1173 SkPixelRef. Sets offset to top-left position for dst for alignment with SkBitmap;
1181 bool extractAlpha(SkBitmap* dst, const SkPaint* paint,
1190 generates mask alpha from SkBitmap. allocator may reference a custom allocation
1192 position for dst for alignment with SkBitmap; (0, 0) unless SkMaskFilter generates
1201 bool extractAlpha(SkBitmap* dst, const SkPaint* paint, Allocator* allocator,
1204 /** Copies SkBitmap pixel address, row bytes, and SkImageInfo to pixmap, if address
1208 pixmap contents become invalid on any future change to SkBitmap.
1211 @return true if SkBitmap has direct access to pixels
1220 /** \class SkBitmap::Allocator
1230 @param bitmap SkBitmap containing SkImageInfo as input, and SkPixelRef as output
1233 virtual bool allocPixelRef(SkBitmap* bitmap) = 0;
1238 /** \class SkBitmap::HeapAllocator
1250 @param bitmap SkBitmap containing SkImageInfo as input, and SkPixelRef as output
1253 bool allocPixelRef(SkBitmap* bitmap) override;
1286 inline uint32_t* SkBitmap::getAddr32(int x, int y) const {
1291 inline uint16_t* SkBitmap::getAddr16(int x, int y) const {
1296 inline uint8_t* SkBitmap::getAddr8(int x, int y) const {