mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2024-12-22 21:00:23 +01:00
added {disabled} to UNMASKED_VENDOR_WEBGL and UNMASKED_RENDERER_WEBGL
to disabled the WEBGL_debug_renderer_info extension Fixes #508
This commit is contained in:
parent
b4a744660b
commit
e2c5dfc06e
@ -534,6 +534,46 @@
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getExtension: {
|
||||||
|
type: "readout",
|
||||||
|
getStatus: createGetStatus(["readout", "input"]),
|
||||||
|
object: ["WebGLRenderingContext", "WebGL2RenderingContext"],
|
||||||
|
fakeGenerator: function(checker){
|
||||||
|
return function getExtension(extensionName){
|
||||||
|
return checkerWrapper(checker, this, arguments, function(args, check){
|
||||||
|
const {prefs, notify, window, original} = check;
|
||||||
|
const originalValue = original.call(this, ...args);
|
||||||
|
if (
|
||||||
|
extensionName === "WEBGL_debug_renderer_info" &&
|
||||||
|
originalValue &&
|
||||||
|
webgl.parameterChangeDefinition[originalValue.UNMASKED_VENDOR_WEBGL] &&
|
||||||
|
webgl.parameterChangeDefinition[originalValue.UNMASKED_RENDERER_WEBGL]
|
||||||
|
){
|
||||||
|
const vendorDef = webgl.parameterChangeDefinition[originalValue.UNMASKED_VENDOR_WEBGL];
|
||||||
|
const {vendorValue, vendorFaked} = vendorDef.fake(originalValue, window, prefs);
|
||||||
|
const rendererDef = webgl.parameterChangeDefinition[originalValue.UNMASKED_RENDERER_WEBGL];
|
||||||
|
const {rendererValue, rendererFaked} = vendorDef.fake(originalValue, window, prefs);
|
||||||
|
if (
|
||||||
|
vendorFaked && vendorValue === null &&
|
||||||
|
rendererFaked && rendererValue === null
|
||||||
|
){
|
||||||
|
const value = null;
|
||||||
|
if (originalValue !== value){
|
||||||
|
notify("fakedReadout");
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return originalValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return originalValue;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
|
},
|
||||||
convertToBlob: {
|
convertToBlob: {
|
||||||
type: "readout",
|
type: "readout",
|
||||||
getStatus: createGetStatus("readout"),
|
getStatus: createGetStatus("readout"),
|
||||||
|
@ -100,7 +100,7 @@
|
|||||||
{message: "input", level: 2},
|
{message: "input", level: 2},
|
||||||
"fillText @ canvas", "strokeText @ canvas",
|
"fillText @ canvas", "strokeText @ canvas",
|
||||||
{name: "webGL", level: 2},
|
{name: "webGL", level: 2},
|
||||||
"readPixels @ canvas", "getParameter @ canvas",
|
"readPixels @ canvas", "getParameter @ canvas", "getExtension @ canvas",
|
||||||
{name: "Audio-API", level: 1},
|
{name: "Audio-API", level: 1},
|
||||||
"getFloatFrequencyData @ audio", "getByteFrequencyData @ audio",
|
"getFloatFrequencyData @ audio", "getByteFrequencyData @ audio",
|
||||||
"getFloatTimeDomainData @ audio", "getByteTimeDomainData @ audio",
|
"getFloatTimeDomainData @ audio", "getByteTimeDomainData @ audio",
|
||||||
|
@ -136,6 +136,8 @@
|
|||||||
return false;
|
return false;
|
||||||
case "{empty}":
|
case "{empty}":
|
||||||
return "";
|
return "";
|
||||||
|
case "{disabled}":
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
return settingValue;
|
return settingValue;
|
||||||
},
|
},
|
||||||
|
@ -4,6 +4,7 @@ Version 1.5:
|
|||||||
|
|
||||||
new features:
|
new features:
|
||||||
- added {empty}, {false} and {undefined} to webGL preference parameters (i.e. VENDOR, RENDERER, UNMASKED_VENDOR_WEBGL and UNMASKED_RENDERER_WEBGL)
|
- added {empty}, {false} and {undefined} to webGL preference parameters (i.e. VENDOR, RENDERER, UNMASKED_VENDOR_WEBGL and UNMASKED_RENDERER_WEBGL)
|
||||||
|
- added {disabled} to UNMASKED_VENDOR_WEBGL and UNMASKED_RENDERER_WEBGL to disabled the WEBGL_debug_renderer_info extension
|
||||||
- improved performance for protected canvas part "input"
|
- improved performance for protected canvas part "input"
|
||||||
|
|
||||||
fixes:
|
fixes:
|
||||||
|
@ -153,6 +153,10 @@
|
|||||||
{
|
{
|
||||||
"version": "1.5Alpha20201109",
|
"version": "1.5Alpha20201109",
|
||||||
"update_link": "https://canvasblocker.kkapsner.de/versions/canvasblocker_beta-1.5Alpha20201109-an+fx.xpi"
|
"update_link": "https://canvasblocker.kkapsner.de/versions/canvasblocker_beta-1.5Alpha20201109-an+fx.xpi"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "1.5Alpha20210103",
|
||||||
|
"update_link": "https://canvasblocker.kkapsner.de/versions/canvasblocker_beta-1.5Alpha20210103-an+fx.xpi"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user