[GTK] Implement ImageBuffer::toBGRAData
[WebKit-https.git] / Source / WebCore / platform / graphics / cg / ImageBufferCG.cpp
index f485a34..a6b122c 100644 (file)
@@ -630,6 +630,13 @@ Vector<uint8_t> data(const ImageData& source, const String& mimeType, std::optio
     return { };
 }
 
+Vector<uint8_t> ImageBuffer::toBGRAData() const
+{
+    if (context().isAcceleratedContext())
+        flushContext();
+    return m_data.toBGRAData(context().isAcceleratedContext(), m_size.width(), m_size.height());
+}
+
 } // namespace WebCore
 
 #endif