51 virtual uint32_t
width()
const = 0;
66 virtual size_t size()
const = 0;
271 virtual uint32_t
width()
const override;
273 virtual uint32_t
height()
const override;
277 virtual size_t size()
const override;
#define UExport
Definition Exports.h:22
virtual void * LockPixels() override
Lock the pixel buffer and get a pointer to the beginning of the data for reading/writing.
virtual bool Scroll(const IntRect &rect, int dx, int dy) override
Shift a rectangle of pixels by an offset.
virtual uint32_t width() const override
Width (in pixels).
virtual uint32_t row_bytes() const override
Number of bytes between rows (usually width * 4).
BitmapSurface(uint32_t width, uint32_t height)
friend class BitmapSurfaceFactory
Definition Surface.h:297
virtual void Resize(uint32_t width, uint32_t height) override
Resize the pixel buffer to a certain width and height (both in pixels).
virtual size_t size() const override
Size in bytes.
virtual uint32_t height() const override
Height (in pixels).
BitmapSurface(const BitmapSurface &)=delete
RefPtr< Bitmap > bitmap()
Get the underlying Bitmap.
void * impl_
Definition Surface.h:299
virtual void UnlockPixels() override
Unlock the pixel buffer.
void operator=(const BitmapSurface &)=delete
Forward declaration for the LockedPixels class.
Definition Bitmap.h:544
A nullable smart pointer.
Definition RefPtr.h:126
User-defined factory to provide your own surface implementation.
Definition Surface.h:246
virtual Surface * CreateSurface(uint32_t width, uint32_t height)=0
Create a native Surface with a certain width and height (in pixels).
virtual void DestroySurface(Surface *surface)=0
Destroy a native Surface previously created by CreateSurface().
virtual ~SurfaceFactory()
User-defined pixel buffer surface.
Definition Surface.h:44
virtual void ClearDirtyBounds()
Clear the dirty bounds.
IntRect dirty_rect(uint32_t index) const
Get a dirty rectangle by index.
virtual uint32_t height() const =0
Height (in pixels).
LockedPixels< Surface * > LockPixelsSafe()
Lock the pixel buffer for reading/writing (safe version, automatically unlocks).
Definition Surface.h:90
static constexpr uint32_t kMaxDirtyRects
The most dirty rectangles the library keeps apart before merging them.
Definition Surface.h:204
virtual void Resize(uint32_t width, uint32_t height)=0
Resize the pixel buffer to a certain width and height (both in pixels).
virtual uint32_t row_bytes() const =0
Number of bytes between rows (usually width * 4).
IntRect dirty_rects_[kMaxDirtyRects]
Definition Surface.h:229
virtual uint32_t width() const =0
Width (in pixels).
virtual void * LockPixels()=0
Lock the pixel buffer and get a pointer to the beginning of the data for reading/writing.
virtual void UnlockPixels()=0
Unlock the pixel buffer.
static void ShiftPixels(void *pixels, uint32_t row_bytes, const IntRect &rect, int dx, int dy)
Shift a rectangle of 32-bit pixels in place.
IntRect dirty_bounds_
Definition Surface.h:228
virtual size_t size() const =0
Size in bytes.
virtual bool Scroll(const IntRect &rect, int dx, int dy)=0
Shift a rectangle of pixels by an offset.
virtual void set_dirty_bounds(const IntRect &bounds)
Add a rectangle to the dirty area.
virtual IntRect dirty_bounds() const
Get the dirty bounds.
uint32_t dirty_rect_count_
Definition Surface.h:230
uint32_t dirty_rect_count() const
Get the number of dirty rectangles (0 when nothing has been painted since the last clear).
Root namespace for every public Ultralight type, function, and enumeration.
SurfaceFactory * GetBitmapSurfaceFactory()
Get the default Bitmap Surface Factory singleton.
Integer Rectangle Helper.
Definition Geometry.h:533