Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f2bd2968f34cb46e63e17e3cfd2151882a177046
      
https://github.com/WebKit/WebKit/commit/f2bd2968f34cb46e63e17e3cfd2151882a177046
  Author: Adrian Perez de Castro <ape...@igalia.com>
  Date:   2025-03-06 (Thu, 06 Mar 2025)

  Changed paths:
    M Source/WebKit/WPEPlatform/wpe/drm/WPEDisplayDRM.cpp
    M Source/WebKit/WPEPlatform/wpe/drm/WPEScreenDRM.cpp
    M Source/WebKit/WPEPlatform/wpe/drm/WPEScreenDRMPrivate.h

  Log Message:
  -----------
  Register WPE_SETTING_DRM_SCALE and provide a sane default
https://bugs.webkit.org/show_bug.cgi?id=289230

Reviewed by Carlos Garcia Campos.

* Source/WebKit/WPEPlatform/wpe/drm/WPEDisplayDRM.cpp:
(wpeDisplayDRMConstructed): Added, registers the WPE_SETTING_DRM_SCALE
setting.
(wpeDisplayDRMSetup): Improve the logic that parses the WPE_DRM_SCALE
environment variable, checking for parsing errors and the value of the
variable. If the value from the environment cannot be used, call
wpeScreenDRMGuessScale() to find a reasonable default for the screen.
While at it, bounds-check values possibly set by the application and
avoid using them if too small or too big.
(wpe_display_drm_class_init):
* Source/WebKit/WPEPlatform/wpe/drm/WPEScreenDRM.cpp:
(wpeScreenDRMGuessScale): Added, switches from 1.0 scaling to 2.0 if the
screen is at least 1200px tall and has a density of 192dpi. The logic
could use more finesse, choosing fractional values in between but works
well enough as a first approach.
* Source/WebKit/WPEPlatform/wpe/drm/WPEScreenDRMPrivate.h:

Canonical link: https://commits.webkit.org/291757@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to