Skip to content

[graphics] reorganize image creation - #23629

Draft
linev wants to merge 14 commits into
root-project:masterfrom
linev:_next
Draft

linev wants to merge 14 commits into
root-project:masterfrom
linev:_next

Conversation

@linev

@linev linev commented Oct 6, 2026

Copy link
Copy Markdown
Member

Namely method TPad::Print().
It used for batch and online image creation.
In last case pixel buffers extracted and saved into image file.
There are several workarounds required for GL and X11 canvases.

Main idea of PR - move such workarounds to concrete implementation and
avoid in generic TPad::Print() code some special workaround handlings.

Also TASImage::FromPad() has too many X11 code which need to be
moved to specific X11/GL/Qt6 parts.

Last big step in cleanup code from gVirtualX

Work in progress ...

linev added 14 commits October 5, 2026 17:01
Instead use MakeInteractive(), GetInteractive(), FreeInteractive() wrappers
While EImageFileTypes used for image format, add extra types which may not directly supported by TImage itself
It returns 1 if image really created, 0 in case of failure and
-1 when image format not implemented. Return value important to
fall-back to alternative storage if desired

Deprecate in ROOT7 old SaveImage method which does not have return value
Now one can use return value to clearly indicate if format not supported
Or if failure happens when file was saved
Use new TImage formats to provide correct argument
Move functionality to select device, flush device,
wait some time and so on to correspondent painters.
Only concrete backend takes care of all necessary
updates before getting access to pixmap

Now one can try to optimize each backend individually -
once they works as before.
It is special routine to sync X11 display,
therefore implement it directly in TRootCanvas class where real implementation exists.

Actually it only needed in virtualX- and GL-based painters

Add special 101 mode to request window attributes.
Somehow it better sync for X11 display.
Used by GL pad painter for workaround issue root-project#22157
Use special 101 update mode when extra window attributes are requested
Remove multiple update and flush - which not reliable, only keep on Mac
No need to use canvas implementation,
one can directly invoke gVirtualX methods
@linev linev self-assigned this Oct 6, 2026
@linev
linev marked this pull request as draft October 6, 2026 14:22
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown

Test Results

    23 files      23 suites   3d 19h 12m 36s ⏱️
 3 883 tests  3 878 ✅ 0 💤 5 ❌
79 320 runs  79 313 ✅ 0 💤 7 ❌

For more details on these failures, see this check.

Results for commit 4c1ede7.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant