diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2019-10-21 16:12:19 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2019-11-27 09:55:10 +0100 |
commit | 063413593318f07f46954912dedae9e6caa9853c (patch) | |
tree | 8fc86efae514ec7e8447d4665398830d9628f274 /vcl/inc/skia | |
parent | 8f7c1fabfdb5d88a3d6f9581d654dd0d2e6495e1 (diff) |
resize surface in SkiaSalGraphicsImpl if needed
This is similar to what the OpenGL backend does. Apparently the VCL
code can just silently resize the graphics without telling.
Change-Id: Ie7c2a7798e76ad598e9cdd1435d68ed03793c408
Diffstat (limited to 'vcl/inc/skia')
-rw-r--r-- | vcl/inc/skia/gdiimpl.hxx | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/vcl/inc/skia/gdiimpl.hxx b/vcl/inc/skia/gdiimpl.hxx index c7c59ac9b2d6..463e927c3572 100644 --- a/vcl/inc/skia/gdiimpl.hxx +++ b/vcl/inc/skia/gdiimpl.hxx @@ -185,19 +185,19 @@ public: void drawBitmap(const SalTwoRect& rPosAry, const SkBitmap& bitmap); - // To be called after any drawing. - void scheduleFlush(); - - // Internal, called by SkiaFlushIdle. - virtual void performFlush() = 0; - #ifdef DBG_UTIL void dump(const char* file) const; static void dump(const SkBitmap& bitmap, const char* file); #endif protected: + // To be called before any drawing. + void preDraw(); + // To be called after any drawing. + void postDraw(); + virtual void createSurface(); + void resetSurface(); void setProvider(SalGeometryProvider* provider) { mProvider = provider; } @@ -205,7 +205,10 @@ protected: void invert(basegfx::B2DPolygon const& rPoly, SalInvert eFlags); -protected: + // Called by SkiaFlushIdle. + virtual void performFlush() = 0; + friend class SkiaFlushIdle; + // get the width of the device int GetWidth() const { return mProvider ? mProvider->GetWidth() : 1; } // get the height of the device |