summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/skia/gdiimpl.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index b2341c90632c..90cb2bd04f1c 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -350,12 +350,14 @@ void SkiaSalGraphicsImpl::drawMask(const SalTwoRect& rPosAry, const SalBitmap& r
std::shared_ptr<SalBitmap> SkiaSalGraphicsImpl::getBitmap(long nX, long nY, long nWidth,
long nHeight)
{
+ mSurface->getCanvas()->flush();
sk_sp<SkImage> image = mSurface->makeImageSnapshot(SkIRect::MakeXYWH(nX, nY, nWidth, nHeight));
return std::make_shared<SkiaSalBitmap>(*image);
}
Color SkiaSalGraphicsImpl::getPixel(long nX, long nY)
{
+ mSurface->getCanvas()->flush();
// TODO this is presumably slow, and possibly won't work with GPU surfaces
SkBitmap bitmap;
if (!bitmap.tryAllocN32Pixels(GetWidth(), GetHeight()))
@@ -456,6 +458,7 @@ bool SkiaSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolygon,
#ifdef DBG_UTIL
void SkiaSalGraphicsImpl::dump(const char* file) const
{
+ mSurface->getCanvas()->flush();
sk_sp<SkImage> image = mSurface->makeImageSnapshot();
sk_sp<SkData> data = image->encodeToData();
std::ofstream ostream(file, std::ios::binary);