Lines Matching refs:bitmap

103     /** Set to true to require the decoder to return a bitmap with unpremultiplied
104 colors. The default is false, meaning the resulting bitmap will have its
106 NOTE: Passing true to this function may result in a bitmap which cannot
178 * If a bitmap is decoded into SkBitmap::A8_Config, the resulting bitmap
212 // original bitmap, sampling 1 pixel for every size pixels. e.g. if sample
213 // size is set to 3, then the returned bitmap will be 1/3 as wide and high,
242 only the bitmap's info need be set. If kDecodePixels_Mode
243 is passed, then the bitmap must have pixels or a pixelRef.
246 kDecodeBounds_Mode, //!< only return info in bitmap
247 kDecodePixels_Mode //!< return entire bitmap (including pixels)
254 kFailure = 0, //!< Image failed to decode. bitmap will be
263 /** Given a stream, decode it into the specified bitmap.
264 If the decoder can decompress the image, it calls bitmap.setInfo(),
268 bitmap. It can then set the pixels with the decompressed image.
270 * decoding, the function converts the decoded colortype in bitmap
277 an existing bitmap's memory.
282 Result decode(SkStream*, SkBitmap* bitmap, SkColorType pref, Mode);
283 Result decode(SkStream* stream, SkBitmap* bitmap, Mode mode) {
284 return this->decode(stream, bitmap, kUnknown_SkColorType, mode);
311 in bitmap. Return true for success or false on failure.
319 static bool DecodeFile(const char file[], SkBitmap* bitmap, SkColorType pref, Mode,
321 static bool DecodeFile(const char file[], SkBitmap* bitmap) {
322 return DecodeFile(file, bitmap, kUnknown_SkColorType, kDecodePixels_Mode, NULL);
326 result in bitmap. Return true for success or false on failure.
334 static bool DecodeMemory(const void* buffer, size_t size, SkBitmap* bitmap, SkColorType pref,
336 static bool DecodeMemory(const void* buffer, size_t size, SkBitmap* bitmap){
337 return DecodeMemory(buffer, size, bitmap, kUnknown_SkColorType, kDecodePixels_Mode, NULL);
356 in bitmap. Return true for success or false on failure.
364 static bool DecodeStream(SkStreamRewindable* stream, SkBitmap* bitmap, SkColorType pref, Mode,
366 static bool DecodeStream(SkStreamRewindable* stream, SkBitmap* bitmap) {
367 return DecodeStream(stream, bitmap, kUnknown_SkColorType, kDecodePixels_Mode, NULL);
371 bool decode(SkStream* stream, SkBitmap* bitmap, SkBitmap::Config pref, Mode mode) {
372 return this->decode(stream, bitmap, SkBitmapConfigToColorType(pref), mode);
377 static bool DecodeFile(const char file[], SkBitmap* bitmap, SkBitmap::Config pref, Mode mode,
379 return DecodeFile(file, bitmap, SkBitmapConfigToColorType(pref), mode, format);
381 static bool DecodeMemory(const void* buffer, size_t size, SkBitmap* bitmap,
383 return DecodeMemory(buffer, size, bitmap, SkBitmapConfigToColorType(pref), mode, format);
385 static bool DecodeStream(SkStreamRewindable* stream, SkBitmap* bitmap, SkBitmap::Config pref,
387 return DecodeStream(stream, bitmap, SkBitmapConfigToColorType(pref), mode, format);
393 virtual Result onDecode(SkStream*, SkBitmap* bitmap, Mode) = 0;
403 virtual bool onDecodeSubset(SkBitmap* bitmap, const SkIRect& rect) {
411 * @param dst the destination bitmap.
412 * @param src the source bitmap that is sampled by sampleSize from the
413 * original bitmap.
414 * @param sampleSize the sample size that src is sampled from the original bitmap.
415 * @param (dstX, dstY) the upper-left point of the dest bitmap in terms of
416 * the coordinate in the original bitmap.
418 * @param (srcX, srcY) the upper-left point of the src bitmap in terms of
419 * the coordinate in the original bitmap.
458 /* Helper for subclasses. Call this to allocate the pixel memory given the bitmap's info.
475 the returned bitmap. SrcDepth and hasAlpha reflect the raw data of the