Skia
2D Graphics Library
SkImage.h File Reference
#include "include/core/SkAlphaType.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkRect.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkSize.h"
#include "include/private/base/SkAPI.h"
#include <cstddef>
#include <cstdint>
#include <memory>
#include <optional>
Include dependency graph for SkImage.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  SkImage
 SkImage describes a two dimensional array of pixels to draw. More...
 
class  SkImage::AsyncReadResult
 The result from asyncRescaleAndReadPixels() or asyncRescaleAndReadPixelsYUV420(). More...
 
struct  SkImage::RequiredProperties
 

Namespaces

 skgpu
 This file includes numerous public types that are used by all of our gpu backends.
 
 skgpu::graphite
 
 SkImages
 

Typedefs

using SkImages::ReleaseContext = void *
 Caller data passed to RasterReleaseProc; may be nullptr. More...
 
using SkImages::RasterReleaseProc = void(const void *pixels, ReleaseContext)
 Function called when SkImage no longer shares pixels. More...
 

Enumerations

enum class  SkImages::BitDepth { SkImages::kU8 , SkImages::kF16 }
 

Functions

SK_API sk_sp< SkImageSkImages::RasterFromBitmap (const SkBitmap &bitmap)
 Creates a CPU-backed SkImage from bitmap, sharing or copying bitmap pixels. More...
 
SK_API sk_sp< SkImageSkImages::RasterFromCompressedTextureData (sk_sp< SkData > data, int width, int height, SkTextureCompressionType type)
 Creates a CPU-backed SkImage from compressed data. More...
 
SK_API sk_sp< SkImageSkImages::DeferredFromEncodedData (sk_sp< SkData > encoded, std::optional< SkAlphaType > alphaType=std::nullopt)
 Return a SkImage using the encoded data, but attempts to defer decoding until the image is actually used/drawn. More...
 
SK_API sk_sp< SkImageSkImages::DeferredFromGenerator (std::unique_ptr< SkImageGenerator > imageGenerator)
 Creates SkImage from data returned by imageGenerator. More...
 
SK_API sk_sp< SkImageSkImages::DeferredFromPicture (sk_sp< SkPicture > picture, const SkISize &dimensions, const SkMatrix *matrix, const SkPaint *paint, BitDepth bitDepth, sk_sp< SkColorSpace > colorSpace, SkSurfaceProps props)
 Creates SkImage from picture. More...
 
SK_API sk_sp< SkImageSkImages::DeferredFromPicture (sk_sp< SkPicture > picture, const SkISize &dimensions, const SkMatrix *matrix, const SkPaint *paint, BitDepth bitDepth, sk_sp< SkColorSpace > colorSpace)
 
SK_API sk_sp< SkImageSkImages::RasterFromPixmapCopy (const SkPixmap &pixmap)
 Creates a CPU-backed SkImage from pixmap, copying the pixel data. More...
 
SK_API sk_sp< SkImageSkImages::RasterFromPixmap (const SkPixmap &pixmap, RasterReleaseProc rasterReleaseProc, ReleaseContext releaseContext)
 Creates CPU-backed SkImage from pixmap, sharing SkPixmap pixels. More...
 
SK_API sk_sp< SkImageSkImages::RasterFromData (const SkImageInfo &info, sk_sp< SkData > pixels, size_t rowBytes)
 Creates CPU-backed SkImage from pixel data described by info. More...
 
SK_API sk_sp< SkImageSkImages::MakeWithFilter (sk_sp< SkImage > src, const SkImageFilter *filter, const SkIRect &subset, const SkIRect &clipBounds, SkIRect *outSubset, SkIPoint *offset)
 Creates a filtered SkImage on the CPU. More...