mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 01:50:56 +07:00
IJPL-162747 Enable out-of-process JCEF by default
fix some warnings along the way GitOrigin-RevId: 3cd039d1b276f7aa9d6c8723c46aee208ef35e60
This commit is contained in:
committed by
intellij-monorepo-bot
parent
2466c3a39b
commit
973fbd1607
@@ -95,7 +95,12 @@ public final class JBCefApp {
|
||||
addCefCustomSchemeHandlerFactory(new JBCefFileSchemeHandlerFactory());
|
||||
|
||||
if (RegistryManager.getInstance().is("ide.browser.jcef.out-of-process.enabled")) {
|
||||
System.setProperty("jcef.remote.enabled", "true");
|
||||
if (Boolean.getBoolean("idea.debug.mode"))
|
||||
LOG.debug("Out-of-process jcef mode is disabled (because idea.debug.mode=true)");
|
||||
else if (SystemInfo.isWayland)
|
||||
LOG.debug("Out-of-process jcef mode is temporarily disabled in Wayland"); // TODO: fix https://youtrack.jetbrains.com/issue/IJPL-161273
|
||||
else
|
||||
System.setProperty("jcef.remote.enabled", "true");
|
||||
}
|
||||
|
||||
Boolean result = null;
|
||||
@@ -103,9 +108,11 @@ public final class JBCefApp {
|
||||
// Temporary use reflection to avoid jcef-version increment
|
||||
Method m = CefApp.class.getMethod("isRemoteEnabled");
|
||||
result = (boolean)m.invoke(CefApp.class);
|
||||
} catch (Throwable e) {}
|
||||
} catch (Throwable e) {
|
||||
LOG.warn(e);
|
||||
}
|
||||
|
||||
IS_REMOTE_ENABLED = result == null ? false : result;
|
||||
IS_REMOTE_ENABLED = result != null && result;
|
||||
}
|
||||
|
||||
private JBCefApp(@NotNull JCefAppConfig config) throws IllegalStateException {
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.ui.jcef;
|
||||
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.ui.Gray;
|
||||
import com.intellij.util.JBHiDPIScaledImage;
|
||||
import com.intellij.util.RetinaImage;
|
||||
import com.jetbrains.JBR;
|
||||
@@ -26,7 +24,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
@SuppressWarnings("NonPrivateFieldAccessedInSynchronizedContext")
|
||||
class JBCefNativeOsrHandler extends JBCefOsrHandler implements CefNativeRenderHandler {
|
||||
private static final int CLEAN_CACHE_TIME_MS = Integer.getInteger("jcef.remote.osr.clean_cache_time_ms", 10*1000); // 10 sec
|
||||
private static final boolean FORCE_USE_SOFTWARE_RENDERING = true; // NOTE: temporary enabled until fixed IJPL-161293
|
||||
private static final boolean FORCE_USE_SOFTWARE_RENDERING = !Boolean.getBoolean("jcef.remote.enable_hardware_rendering"); // NOTE: temporary enabled until fixed IJPL-161293
|
||||
|
||||
private final Map<String, SharedMemory.WithRaster> mySharedMemCache = new ConcurrentHashMap<>();
|
||||
private SharedMemory.WithRaster myCurrentFrame;
|
||||
|
||||
@@ -400,7 +400,7 @@ ide.browser.jcef.svg-viewer.enabled=true
|
||||
ide.browser.jcef.svg-viewer.enabled.description=Enables the image SVG viewer based on JCEF
|
||||
ide.browser.jcef.svg-viewer.debug=false
|
||||
ide.browser.jcef.svg-viewer.debug.description=Debug UI in the viewer
|
||||
ide.browser.jcef.out-of-process.enabled=false
|
||||
ide.browser.jcef.out-of-process.enabled=true
|
||||
ide.browser.jcef.out-of-process.enabled.restartRequired=true
|
||||
ide.browser.jcef.out-of-process.enabled.description=Enable JCEF is a separate process
|
||||
|
||||
|
||||
Reference in New Issue
Block a user