From 09534ab81f72ce766c8d13ea13216dd589d41a1c Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 19 Mar 2021 15:44:55 +1100 Subject: Add an explicit FlushDrawing method to Surface that should be called after completing a bitmap. Currently only has a real implementation on Direct2D. Avoiding implicit flushes inside Copy and FillRectangle produced a 23% speed improvement on files with about 1 indentation guide per line as the drawing pipeline was being flushed for each indentation guide. --- gtk/PlatGTK.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gtk') diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index 3b19df3ba..3f0918886 100755 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -189,6 +189,7 @@ public: void SetClip(PRectangle rc) override; void PopClip() override; void FlushCachedState() override; + void FlushDrawing() override; void SetUnicodeMode(bool unicodeMode_) override; void SetDBCSMode(int codePage) override; @@ -981,6 +982,9 @@ void SurfaceImpl::SetDBCSMode(int codePage) { void SurfaceImpl::SetBidiR2L(bool) { } +void SurfaceImpl::FlushDrawing() { +} + std::unique_ptr Surface::Allocate(int) { return std::make_unique(); } -- cgit v1.2.3