From b37ca803919069a79869fd940a4d334ca5d13abd Mon Sep 17 00:00:00 2001 From: David Capello Date: Fri, 22 Mar 2024 20:22:23 -0300 Subject: [PATCH] Add SkSurface_Raster::skBitmap() member function This is useful to access the pixel data directly having knowing the type of surface (SkSurface_Base::Type::kRaster). --- src/image/SkSurface_Raster.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/image/SkSurface_Raster.h b/src/image/SkSurface_Raster.h index 3d0f43d3eeed..06691ed7ea90 100644 --- a/src/image/SkSurface_Raster.h +++ b/src/image/SkSurface_Raster.h @@ -49,6 +49,8 @@ class SkSurface_Raster : public SkSurface_Base { void onRestoreBackingMutability() override; sk_sp onCapabilities() override; + SkBitmap& skBitmap() { return fBitmap; } + private: SkBitmap fBitmap; bool fWeOwnThePixels;