summaryrefslogtreecommitdiff
path: root/SharedGraphics/GraphicsBitmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'SharedGraphics/GraphicsBitmap.cpp')
-rw-r--r--SharedGraphics/GraphicsBitmap.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/SharedGraphics/GraphicsBitmap.cpp b/SharedGraphics/GraphicsBitmap.cpp
index eb41c041c5..b48cdf853a 100644
--- a/SharedGraphics/GraphicsBitmap.cpp
+++ b/SharedGraphics/GraphicsBitmap.cpp
@@ -1,4 +1,5 @@
-#include "GraphicsBitmap.h"
+#include <SharedGraphics/GraphicsBitmap.h>
+#include <SharedGraphics/PNGLoader.h>
#include <sys/mman.h>
#include <unistd.h>
#include <fcntl.h>
@@ -27,6 +28,11 @@ Retained<GraphicsBitmap> GraphicsBitmap::create_wrapper(Format format, const Siz
return adopt(*new GraphicsBitmap(format, size, data));
}
+RetainPtr<GraphicsBitmap> GraphicsBitmap::load_from_file(const String& path)
+{
+ return load_png(path);
+}
+
RetainPtr<GraphicsBitmap> GraphicsBitmap::load_from_file(Format format, const String& path, const Size& size)
{
int fd = open(path.characters(), O_RDONLY, 0644);