Skip to content

Commit

Permalink
Add SkSurface_Raster::skBitmap() member function
Browse files Browse the repository at this point in the history
This is useful to access the pixel data directly having knowing the
type of surface (SkSurface_Base::Type::kRaster).
  • Loading branch information
dacap committed Mar 22, 2024
1 parent f7dc8a2 commit b37ca80
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/image/SkSurface_Raster.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ class SkSurface_Raster : public SkSurface_Base {
void onRestoreBackingMutability() override;
sk_sp<const SkCapabilities> onCapabilities() override;

SkBitmap& skBitmap() { return fBitmap; }

private:
SkBitmap fBitmap;
bool fWeOwnThePixels;
Expand Down

0 comments on commit b37ca80

Please sign in to comment.