Skip to content

Commit

Permalink
Correct Display DPI and Pixel Density.
Browse files Browse the repository at this point in the history
Reverted Chromium zoom level to 100% as it should be.
Set Chrome-scale to 2.0 as the Pixel Density in the application.
Only for Chromium (Gecko might require different params as the engine scales differently).
  • Loading branch information
helifax committed Nov 22, 2024
1 parent a6e9ff4 commit f14b535
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
Binary file modified CHROMIUM_PREBUILT_AARS/ChromiumUi.aar
Binary file not shown.
Binary file modified CHROMIUM_PREBUILT_AARS/Content.aar
Binary file not shown.
5 changes: 3 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ android {
buildConfigField "Boolean", "FXA_USE_CHINA_SERVER", "false"
buildConfigField "String[]", "SPEECH_SERVICES", "{ com.igalia.wolvic.speech.SpeechServices.MEETKAI }"
buildConfigField "Boolean", "SUPPORTS_SYSTEM_NOTIFICATIONS", "false"
buildConfigField "Float", "DEFAULT_DENSITY", "1.6f"
buildConfigField "Float", "DEFAULT_DENSITY", "2.0f"
buildConfigField "Float", "DEFAULT_DENSITY", "2.0f"
buildConfigField "Float", "DEFAULT_WINDOW_DISTANCE", "0.0f"
buildConfigField "Boolean", "ENABLE_PAGE_ZOOM", "false"

Expand Down Expand Up @@ -273,7 +274,7 @@ android {
arguments "-DVR_SDK_LIB=spaces-lib", "-DSPACES=ON", "-DOPENXR=ON"
}
}
buildConfigField "Float", "DEFAULT_DENSITY", "1.6f"
buildConfigField "Float", "DEFAULT_DENSITY", "2.0f"
}

aosp {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ private void setupWebGLMSAA() {
if (mRuntimeSettings.getGlMsaaLevel() == 0)
CommandLine.getInstance().appendSwitchWithValue("webgl-antialiasing-mode", "none");
CommandLine.getInstance().appendSwitchWithValue("webgl-msaa-sample-count", MSAALevelAsString);
CommandLine.getInstance().appendSwitch("force-device-scale-factor=2.0");
}

private void initBrowserProcess(Context context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ SettingsStore getInstance(final @NonNull Context aContext) {
// The DPI is calculated so the default window has a logical width of 1024 CSS pixels.
// For a density of 1.0, the DPI is 128 and the texture matches the logical size of the webpage.
// For a density of 1.5, the DPI of 192 and the resolution of the texture is twice the world size of the window.
public final static int DISPLAY_DPI_BASE = 128;
public final static int DISPLAY_DPI_BASE = 36;
public final static int DISPLAY_DPI_DEFAULT = (int) (DISPLAY_DENSITY_DEFAULT * DISPLAY_DPI_BASE);
public final static int DISPLAY_DPI_MIN = 70;
public final static int DISPLAY_DPI_MAX = 300;
Expand Down

0 comments on commit f14b535

Please sign in to comment.