feat: 解决了opengl 默认chrome配置不调用的问题
This commit is contained in:
parent
a0f4ca2f3a
commit
ba516af2f7
|
@ -39,6 +39,9 @@ const themeTitleBarStyles = {
|
|||
export const platform = process.platform === "darwin" ? "macos" : "windows";
|
||||
|
||||
app.commandLine.appendSwitch('disable-web-security');
|
||||
app.commandLine.appendSwitch('ignore-gpu-blocklist');
|
||||
app.commandLine.appendSwitch('use-angle', 'gl');
|
||||
|
||||
// app.disableHardwareAcceleration()
|
||||
|
||||
function createWindow() {
|
||||
|
|
|
@ -6,20 +6,20 @@ export const initCornerstoneDICOMImageLoader = () => {
|
|||
const { preferSizeOverAccuracy, useNorm16Texture } =
|
||||
cornerstone.getConfiguration().rendering;
|
||||
|
||||
console.log("dddd", cornerstone.getConfiguration().rendering);
|
||||
cornerstone.setUseSharedArrayBuffer(false);
|
||||
cornerstone.setConfiguration({
|
||||
detectGPUConfig: {
|
||||
// benchmarksURL: "http://localhost:9000",
|
||||
benchmarksURL: "",
|
||||
},
|
||||
rendering: {
|
||||
...cornerstone.getConfiguration().rendering,
|
||||
// useCPURendering: true,
|
||||
// useNorm16Texture: true,
|
||||
},
|
||||
isMobile: false,
|
||||
enableCacheOptimization: false,
|
||||
});
|
||||
console.log("preferSizeOverAccuracy", preferSizeOverAccuracy);
|
||||
console.log("useNorm16Texture", useNorm16Texture);
|
||||
|
||||
cornerstoneDICOMImageLoader.external.cornerstone = cornerstone;
|
||||
cornerstoneDICOMImageLoader.external.dicomParser = dicomParser;
|
||||
|
@ -27,6 +27,7 @@ export const initCornerstoneDICOMImageLoader = () => {
|
|||
useWebWorkers: true,
|
||||
decodeConfig: {
|
||||
convertFloatPixelDataToInt: false,
|
||||
// use16BitDataType: false,
|
||||
use16BitDataType: preferSizeOverAccuracy || useNorm16Texture,
|
||||
},
|
||||
});
|
||||
|
@ -42,6 +43,7 @@ export const initCornerstoneDICOMImageLoader = () => {
|
|||
startWebWorkersOnDemand: false,
|
||||
taskConfiguration: {
|
||||
decodeTask: {
|
||||
useNorm16Texture: true,
|
||||
initializeCodecsOnStartup: false,
|
||||
strict: false,
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user