summaryrefslogtreecommitdiff
path: root/SharedGraphics/GraphicsBitmap.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-05-06 14:04:54 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-05-06 14:04:54 +0200
commitcec16105cc5bbbb7743b769e65377fc91fb918b1 (patch)
tree5cc421a9003acfac6cc8c07ccb6877e2e157b4c8 /SharedGraphics/GraphicsBitmap.h
parentfafdda8902e25e39c0e8484252a8e17271ed4538 (diff)
downloadserenity-cec16105cc5bbbb7743b769e65377fc91fb918b1.zip
Make sure all GraphicsBitmap scanlines are 16-byte aligned.
This is a prerequisite for some optimizations.
Diffstat (limited to 'SharedGraphics/GraphicsBitmap.h')
-rw-r--r--SharedGraphics/GraphicsBitmap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/SharedGraphics/GraphicsBitmap.h b/SharedGraphics/GraphicsBitmap.h
index ba7f3fd667..de8630bdf9 100644
--- a/SharedGraphics/GraphicsBitmap.h
+++ b/SharedGraphics/GraphicsBitmap.h
@@ -35,6 +35,8 @@ public:
void set_mmap_name(const String&);
+ size_t size_in_bytes() const { return m_pitch * m_size.height() * sizeof(RGBA32); }
+
private:
GraphicsBitmap(Format, const Size&);
GraphicsBitmap(Format, const Size&, RGBA32*);