Disable subpixel AA during the SVG benchmark
This commit is contained in:
parent
1459267292
commit
00433d418a
|
@ -42,7 +42,7 @@
|
|||
<div class="form-group" id="pf-aa-level-form-group">
|
||||
<label for="pf-aa-level-select"
|
||||
class="col-form-label mr-sm-2">Antialiasing</label>
|
||||
<select id="pf-aa-level-select"
|
||||
<select id="pf-aa-level-select" autocomplete="off"
|
||||
class="form-control custom-select mr-sm-3">
|
||||
<option value="none" selected>None</option>
|
||||
<option value="ssaa-2">2×SSAA</option>
|
||||
|
|
|
@ -245,12 +245,7 @@ export abstract class DemoAppController<View extends DemoView> extends AppContro
|
|||
this.fpsLabel.classList.remove('invisible');
|
||||
}
|
||||
|
||||
protected abstract createView(gammaLUT: HTMLImageElement,
|
||||
commonShaderSource: string,
|
||||
shaderSources: ShaderMap<ShaderProgramSource>):
|
||||
View;
|
||||
|
||||
protected updateAALevel(): Promise<void> {
|
||||
updateAALevel(): Promise<void> {
|
||||
let aaType: AntialiasingStrategyName, aaLevel: number;
|
||||
if (this.aaLevelSelect != null) {
|
||||
const selectedOption = this.aaLevelSelect.selectedOptions[0];
|
||||
|
@ -280,6 +275,11 @@ export abstract class DemoAppController<View extends DemoView> extends AppContro
|
|||
});
|
||||
}
|
||||
|
||||
protected abstract createView(gammaLUT: HTMLImageElement,
|
||||
commonShaderSource: string,
|
||||
shaderSources: ShaderMap<ShaderProgramSource>):
|
||||
View;
|
||||
|
||||
private initPopup(cardID: string, popupButtonID: string, closeButtonID: string): void {
|
||||
const card = document.getElementById(cardID) as HTMLElement | null;
|
||||
const button = document.getElementById(popupButtonID) as HTMLButtonElement | null;
|
||||
|
|
|
@ -164,14 +164,14 @@ class BenchmarkAppController extends DemoAppController<BenchmarkTestView> {
|
|||
if (aaLevelFormGroup.parentElement != null)
|
||||
aaLevelFormGroup.parentElement.removeChild(aaLevelFormGroup);
|
||||
benchmarkTextForm.insertBefore(aaLevelFormGroup, benchmarkTextForm.firstChild);
|
||||
this.loadInitialFile(this.builtinFileURI);
|
||||
this.modeChanged();
|
||||
});
|
||||
window.jQuery(benchmarkSVGTab).on('shown.bs.tab', event => {
|
||||
this.mode = 'svg';
|
||||
if (aaLevelFormGroup.parentElement != null)
|
||||
aaLevelFormGroup.parentElement.removeChild(aaLevelFormGroup);
|
||||
benchmarkSVGForm.insertBefore(aaLevelFormGroup, benchmarkSVGForm.firstChild);
|
||||
this.loadInitialFile(this.builtinFileURI);
|
||||
this.modeChanged();
|
||||
});
|
||||
|
||||
this.loadInitialFile(this.builtinFileURI);
|
||||
|
@ -195,6 +195,15 @@ class BenchmarkAppController extends DemoAppController<BenchmarkTestView> {
|
|||
return new BenchmarkTestView(this, gammaLUT, commonShaderSource, shaderSources);
|
||||
}
|
||||
|
||||
private modeChanged(): void {
|
||||
this.loadInitialFile(this.builtinFileURI);
|
||||
if (this.aaLevelSelect != null)
|
||||
this.aaLevelSelect.selectedIndex = 0;
|
||||
if (this.subpixelAARadioButton != null)
|
||||
this.subpixelAARadioButton.checked = false;
|
||||
this.updateAALevel();
|
||||
}
|
||||
|
||||
private textFileLoaded(fileData: ArrayBuffer, builtinName: string | null): void {
|
||||
const font = new PathfinderFont(fileData, builtinName);
|
||||
this.font = font;
|
||||
|
|
Loading…
Reference in New Issue