Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce limits on tile GPU memory usage (bp #688) #716

Merged
merged 1 commit into from
Feb 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions common/api/bentleyjs-core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1205,6 +1205,14 @@ export namespace OrderedId64Iterable {
export function uniqueIterator(ids: OrderedId64Iterable): Generator<string, void, unknown>;
}

// @public
export class OrderedSet<T> extends ReadonlyOrderedSet<T> {
constructor(compare: OrderedComparator<T>, clone?: CloneFunction<T>);
add(value: T): this;
clear(): void;
delete(value: T): boolean;
}

// @beta
export function partitionArray<T>(array: T[], criterion: (element: T) => boolean): number;

Expand Down Expand Up @@ -1241,6 +1249,16 @@ export class PriorityQueue<T> implements Iterable<T> {
protected _swap(a: number, b: number): void;
}

// @public
export class ReadonlyOrderedSet<T> implements Iterable<T> {
[Symbol.iterator](): Iterator<T>;
constructor(compare: OrderedComparator<T>, clone?: CloneFunction<T>);
// (undocumented)
protected readonly _array: SortedArray<T>;
has(value: T): boolean;
get size(): number;
}

// @public
export class ReadonlySortedArray<T> implements Iterable<T> {
[Symbol.iterator](): Iterator<T>;
Expand Down
26 changes: 26 additions & 0 deletions common/api/frontend-devtools.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { Decorator } from '@bentley/imodeljs-frontend';
import { EmphasizeElements } from '@bentley/imodeljs-frontend';
import { EventHandled } from '@bentley/imodeljs-frontend';
import { GeometrySummaryOptions } from '@bentley/imodeljs-common';
import { GpuMemoryLimit } from '@bentley/imodeljs-frontend';
import { Hilite } from '@bentley/imodeljs-common';
import { HitDetail } from '@bentley/imodeljs-frontend';
import { Id64Arg } from '@bentley/bentleyjs-core';
Expand Down Expand Up @@ -642,6 +643,7 @@ export interface DiagnosticsPanelProps {
fps?: boolean;
tileStats?: boolean;
memory?: boolean;
tileMemoryBreakdown?: boolean;
gpuProfiler?: boolean;
toolSettings?: boolean;
};
Expand Down Expand Up @@ -791,6 +793,9 @@ export class FlipImageEffect extends AddEffectTool {
static toolId: string;
}

// @internal (undocumented)
export function formatMemory(numBytes: number): string;

// @beta
export class FpsTracker {
constructor(parent: HTMLElement, viewport: Viewport);
Expand Down Expand Up @@ -1408,6 +1413,20 @@ export class SetAspectRatioSkewTool extends Tool {
static toolId: string;
}

// @beta
export class SetGpuMemoryLimitTool extends Tool {
// (undocumented)
static get maxArgs(): number;
// (undocumented)
static get minArgs(): number;
// (undocumented)
parseAndRun(...args: string[]): boolean;
// (undocumented)
run(limit?: GpuMemoryLimit): boolean;
// (undocumented)
static toolId: string;
}

// @alpha
export class SetMapBaseTool extends AttachMapLayerTool {
constructor();
Expand Down Expand Up @@ -1751,6 +1770,13 @@ export interface TextBoxProps {
tooltip?: string;
}

// @beta
export class TileMemoryBreakdown {
constructor(parent: HTMLElement);
// (undocumented)
dispose(): void;
}

// @beta
export class TileStatisticsTracker {
constructor(parent: HTMLElement, vp: Viewport);
Expand Down
Loading