aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-03-19 15:44:55 +1100
committerNeil <nyamatongwe@gmail.com>2021-03-19 15:44:55 +1100
commit09534ab81f72ce766c8d13ea13216dd589d41a1c (patch)
tree2bb190bb18294936a55b1e2c6e70961f22268968 /cocoa
parentdd9ae27be2d1b983638337f24685e6458360dfa3 (diff)
downloadscintilla-mirror-09534ab81f72ce766c8d13ea13216dd589d41a1c.tar.gz
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.
Diffstat (limited to 'cocoa')
-rw-r--r--cocoa/PlatCocoa.h1
-rw-r--r--cocoa/PlatCocoa.mm3
2 files changed, 4 insertions, 0 deletions
diff --git a/cocoa/PlatCocoa.h b/cocoa/PlatCocoa.h
index 8f959014b..1ddb203c7 100644
--- a/cocoa/PlatCocoa.h
+++ b/cocoa/PlatCocoa.h
@@ -120,6 +120,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;
diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm
index f5f69608e..2e3ab2d57 100644
--- a/cocoa/PlatCocoa.mm
+++ b/cocoa/PlatCocoa.mm
@@ -1294,6 +1294,9 @@ void SurfaceImpl::SetDBCSMode(int codePage_) {
void SurfaceImpl::SetBidiR2L(bool) {
}
+void SurfaceImpl::FlushDrawing() {
+}
+
std::unique_ptr<Surface> Surface::Allocate(int) {
return std::make_unique<SurfaceImpl>();
}