Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 571536 - Remove obsolete USE_DOUBLE_BUFFER=true in BufferedCanvas
Summary: Remove obsolete USE_DOUBLE_BUFFER=true in BufferedCanvas
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 4.18   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.20 M1   Edit
Assignee: Lars Vogel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-26 06:37 EST by Lars Vogel CLA
Modified: 2021-03-15 08:24 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2021-02-26 06:37:30 EST
Always true, so we can remove USE_DOUBLE_BUFFER=true in BufferedCanvas
Comment 1 Eclipse Genie CLA 2021-02-26 06:39:56 EST
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.team/+/176933
Comment 2 Lars Vogel CLA 2021-02-26 06:40:16 EST
Nikita, the whole class org.eclipse.compare.internal.BufferedCanvas is really old. Do you know if this double-buffering is still useful for modern SWT applications or can we simply replace it with a regular Canvas?
Comment 3 Nikita Nemkin CLA 2021-02-26 07:18:22 EST
(In reply to Lars Vogel from comment #2)
> Nikita, the whole class org.eclipse.compare.internal.BufferedCanvas is
> really old. Do you know if this double-buffering is still useful for modern
> SWT applications or can we simply replace it with a regular Canvas?

macOS and GTK will double-buffer automatically, Windows needs SWT.DOUBLE_BUFFERED widget style to be specified explicitly.

So, BufferedCanvas should be replaced with Canvas(parent, SWT.DOUBLE_BUFFERED | ...)
Comment 4 Lars Vogel CLA 2021-02-26 07:20:35 EST
Thanks Nikita.

Would it be possible to activate double buffering in Windows by default?
Comment 5 Nikita Nemkin CLA 2021-02-26 07:37:05 EST
(In reply to Lars Vogel from comment #4)
> Thanks Nikita.
> 
> Would it be possible to activate double buffering in Windows by default?

This will reduce painting performance for widgets that don't need it, for example, if all a widget does is paint an image, it doesn't need buffering.

Also, advanced graphics on Windows (GDI+) are implicitly buffered. Forcing SWT.DOUBLE_BUFFERED will be even more wasteful in this case.
Comment 6 Lars Vogel CLA 2021-02-26 08:45:26 EST
Thanks for the clarification, Nikita. Sounds like we should not change the win default.
Comment 8 Lars Vogel CLA 2021-03-15 08:24:35 EDT
Thanks Nikita, I opened Bug 571954 for the complete replacement.