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";
|
export const platform = process.platform === "darwin" ? "macos" : "windows";
|
||||||
|
|
||||||
app.commandLine.appendSwitch('disable-web-security');
|
app.commandLine.appendSwitch('disable-web-security');
|
||||||
|
app.commandLine.appendSwitch('ignore-gpu-blocklist');
|
||||||
|
app.commandLine.appendSwitch('use-angle', 'gl');
|
||||||
|
|
||||||
// app.disableHardwareAcceleration()
|
// app.disableHardwareAcceleration()
|
||||||
|
|
||||||
function createWindow() {
|
function createWindow() {
|
||||||
|
|
|
@ -6,20 +6,20 @@ export const initCornerstoneDICOMImageLoader = () => {
|
||||||
const { preferSizeOverAccuracy, useNorm16Texture } =
|
const { preferSizeOverAccuracy, useNorm16Texture } =
|
||||||
cornerstone.getConfiguration().rendering;
|
cornerstone.getConfiguration().rendering;
|
||||||
|
|
||||||
console.log("dddd", cornerstone.getConfiguration().rendering);
|
|
||||||
cornerstone.setUseSharedArrayBuffer(false);
|
cornerstone.setUseSharedArrayBuffer(false);
|
||||||
cornerstone.setConfiguration({
|
cornerstone.setConfiguration({
|
||||||
detectGPUConfig: {
|
detectGPUConfig: {
|
||||||
// benchmarksURL: "http://localhost:9000",
|
benchmarksURL: "",
|
||||||
},
|
},
|
||||||
rendering: {
|
rendering: {
|
||||||
...cornerstone.getConfiguration().rendering,
|
...cornerstone.getConfiguration().rendering,
|
||||||
// useCPURendering: true,
|
|
||||||
// useNorm16Texture: true,
|
// useNorm16Texture: true,
|
||||||
},
|
},
|
||||||
isMobile: false,
|
isMobile: false,
|
||||||
enableCacheOptimization: false,
|
enableCacheOptimization: false,
|
||||||
});
|
});
|
||||||
|
console.log("preferSizeOverAccuracy", preferSizeOverAccuracy);
|
||||||
|
console.log("useNorm16Texture", useNorm16Texture);
|
||||||
|
|
||||||
cornerstoneDICOMImageLoader.external.cornerstone = cornerstone;
|
cornerstoneDICOMImageLoader.external.cornerstone = cornerstone;
|
||||||
cornerstoneDICOMImageLoader.external.dicomParser = dicomParser;
|
cornerstoneDICOMImageLoader.external.dicomParser = dicomParser;
|
||||||
|
@ -27,6 +27,7 @@ export const initCornerstoneDICOMImageLoader = () => {
|
||||||
useWebWorkers: true,
|
useWebWorkers: true,
|
||||||
decodeConfig: {
|
decodeConfig: {
|
||||||
convertFloatPixelDataToInt: false,
|
convertFloatPixelDataToInt: false,
|
||||||
|
// use16BitDataType: false,
|
||||||
use16BitDataType: preferSizeOverAccuracy || useNorm16Texture,
|
use16BitDataType: preferSizeOverAccuracy || useNorm16Texture,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -42,6 +43,7 @@ export const initCornerstoneDICOMImageLoader = () => {
|
||||||
startWebWorkersOnDemand: false,
|
startWebWorkersOnDemand: false,
|
||||||
taskConfiguration: {
|
taskConfiguration: {
|
||||||
decodeTask: {
|
decodeTask: {
|
||||||
|
useNorm16Texture: true,
|
||||||
initializeCodecsOnStartup: false,
|
initializeCodecsOnStartup: false,
|
||||||
strict: false,
|
strict: false,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user