Bug 4848 - Scale session rather than resizing it
Summary: Scale session rather than resizing it
Status: CLOSED WONTFIX
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: VNC (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.15.0
Assignee: Bugzilla mail exporter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-15 13:26 CEST by Pierre Ossman
Modified: 2022-12-20 14:33 CET (History)
0 users

See Also:
Acceptance Criteria:


Attachments
unicon patches (12.97 KB, application/zip)
2018-07-03 10:19 CEST, Pierre Ossman
Details

Description Pierre Ossman cendio 2013-10-15 13:26:31 CEST
Some users prefer that the session size remains fixed and that the local picture is instead scaled to fit the local window/monitor. Some initial work has been done by unicon and patches have been posted to the mailing list:

http://permalink.gmane.org/gmane.network.vnc.tigervnc.devel/2682

There are two major things to solve:

 * Scaling quality on all platforms

 * User interface. How do we present the different options of resizing the session, scaling the output or just padding?
Comment 1 Pierre Ossman cendio 2018-07-03 10:18:57 CEST
gmane is no more, and unfortunately mail-archive hasn't archive that particular mail. This is what it said though:

Dear TigerVNC developers,

to proceed now with my initial topic on adding a local window scaling functionality to the C++ version of TigerVNC, I submit a small patchset. As this patchset has to be however still improved for some points, I will explain what I have done (-), and summarize what is missing or has to be improved (*):

1) parameter.patch:
  - Add the parameter localScaling to enable/disable the functionality
  * As discussed with Pierre Ossman, this functionality should not define an independent feature, but should be combined with remoteResize to allow just one of these two

2) decoupleFrambuffer.patch:
  - Get the viewport size independent of the framebuffer size

3) scalingPrerequisites.patch:
  - Implement a coordinate transformation from framebuffer coordinates to viewport coordinates and vice versa (Window coordinates are still just translated viewport coordinates)
  - Implement a scaling algorithm using the nearest-neighbour approach

4) scaling.patch:
  - Implement the scaled drawing:
    - Win32:
      - Use StretchBlt(...) instead of BitBlt(...)
    - X11:
      - Use the earlier implemented nearest-neighbour algorithm and a separate rectangular XImage for the update region
      * The universal scaling algorithm has to be substituted by a specialized one using Xrender and/or OpenGL as discussed in earlier emails. Consequentially the universal scaling algorithm is not needed any more, which is then analog to the Win32 version and improves hopefully the quality.
    - OSX:
      * The implementation is missing, because i can not test it

5) scalingImprovement.patch:
  - Improve scaling by featuring another parameter set to enable restrictions for the x-y sizes as well as keeping of the x-y ratio

6) improveWin32StretchBlt.patch
  - Win32: Improve the quality of scaling by using the HALFTONE palette, which is requested by StretchBlt for good quality

7) bilinearScaling.patch
  - Add and enable the utilization of a bilinear scaling algorithm instead of the nearest-neighbour approach
  * The quality of the universal scaling algorithms (nearest-neighbour and bilinear) is still not that good. So if there is at least one available platform (Win32, X11 and OSX) without a specialized algorithm, there should be another universal scaling algorithm, which performs better.


Hopefully this patchset can be used to integrate such a functionality in the general repository code.


Best regards,
Christian
Comment 2 Pierre Ossman cendio 2018-07-03 10:19:53 CEST
Created attachment 878 [details]
unicon patches
Comment 3 Pierre Ossman cendio 2020-06-09 12:45:19 CEST
The use case here here is unclear. We need to get more user feedback why this would be needed.
Comment 4 Pierre Ossman cendio 2022-12-20 14:33:27 CET
We decided to streamline things in bug 7793, where the ability to disable resizing was effectively removed.

As such, this feature request here is no longer relevant.

Note You need to log in before you can comment on or make changes to this bug.