Flutter Engine
The Flutter Engine
|
#include "src/image/SkImage_Raster.h"
#include "include/core/SkBitmap.h"
#include "include/core/SkColorSpace.h"
#include "include/core/SkData.h"
#include "include/core/SkImage.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkPixelRef.h"
#include "include/core/SkPixmap.h"
#include "include/core/SkPoint.h"
#include "include/core/SkRect.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkSize.h"
#include "include/core/SkTypes.h"
#include "src/base/SkRectMemcpy.h"
#include "src/core/SkImageInfoPriv.h"
#include "src/core/SkImagePriv.h"
#include "src/image/SkImage_Base.h"
#include <cstddef>
#include <cstdint>
#include <utility>
Go to the source code of this file.
Functions | |
static bool | is_not_subset (const SkBitmap &bm) |
static void | release_data (void *addr, void *context) |
static SkBitmap | copy_bitmap_subset (const SkBitmap &orig, const SkIRect &subset) |
static sk_sp< SkMipmap > | copy_mipmaps (const SkBitmap &src, SkMipmap *srcMips) |
sk_sp< SkImage > | SkMakeImageFromRasterBitmapPriv (const SkBitmap &bm, SkCopyPixelsMode cpm, uint32_t idForCopy) |
sk_sp< SkImage > | SkMakeImageFromRasterBitmap (const SkBitmap &bm, SkCopyPixelsMode cpm) |
const SkPixelRef * | SkBitmapImageGetPixelRef (const SkImage *image) |
Definition at line 83 of file SkImage_Raster.cpp.
Definition at line 113 of file SkImage_Raster.cpp.
|
static |
Definition at line 33 of file SkImage_Raster.cpp.
|
static |
Definition at line 40 of file SkImage_Raster.cpp.
const SkPixelRef * SkBitmapImageGetPixelRef | ( | const SkImage * | image | ) |
Definition at line 190 of file SkImage_Raster.cpp.
sk_sp< SkImage > SkMakeImageFromRasterBitmap | ( | const SkBitmap & | bm, |
SkCopyPixelsMode | cpm | ||
) |
Examines the bitmap to decide if it can share the existing pixelRef, or if it needs to make a deep-copy of the pixels.
The bitmap's pixelref will be shared if either the bitmap is marked as immutable, or CopyPixelsMode allows it. Shared pixel refs are also locked when kLocked_SharedPixelRefMode is specified.
Passing kLocked_SharedPixelRefMode allows the image's peekPixels() method to succeed, but it will force any lazy decodes/generators to execute if they exist on the pixelref.
It is illegal to call this with a texture-backed bitmap.
If the bitmap's colortype cannot be converted into a corresponding SkImageInfo, or the bitmap's pixels cannot be accessed, this will return nullptr.
Definition at line 182 of file SkImage_Raster.cpp.
sk_sp< SkImage > SkMakeImageFromRasterBitmapPriv | ( | const SkBitmap & | bm, |
SkCopyPixelsMode | cpm, | ||
uint32_t | idForCopy | ||
) |
Definition at line 169 of file SkImage_Raster.cpp.