From 5a98d7a1f6f23aab3237a995355a80973ebea5b9 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Tue, 6 Aug 2024 18:36:28 +1000 Subject: [PATCH] perf(ui): disable stroke, perfect draw on compositing rect --- .../controlLayers/konva/CanvasObjectRenderer.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/invokeai/frontend/web/src/features/controlLayers/konva/CanvasObjectRenderer.ts b/invokeai/frontend/web/src/features/controlLayers/konva/CanvasObjectRenderer.ts index d56f2e7636..2e4c2b8194 100644 --- a/invokeai/frontend/web/src/features/controlLayers/konva/CanvasObjectRenderer.ts +++ b/invokeai/frontend/web/src/features/controlLayers/konva/CanvasObjectRenderer.ts @@ -8,7 +8,11 @@ import type { CanvasLayerAdapter } from 'features/controlLayers/konva/CanvasLaye import type { CanvasManager } from 'features/controlLayers/konva/CanvasManager'; import type { CanvasMaskAdapter } from 'features/controlLayers/konva/CanvasMaskAdapter'; import { CanvasRectRenderer } from 'features/controlLayers/konva/CanvasRect'; -import { getPrefixedId, konvaNodeToBlob, previewBlob } from 'features/controlLayers/konva/util'; +import { + getPrefixedId, + konvaNodeToBlob, + previewBlob, +} from 'features/controlLayers/konva/util'; import { type CanvasBrushLineState, type CanvasEraserLineState, @@ -105,8 +109,10 @@ export class CanvasObjectRenderer { if (this.parent.type === 'inpaint_mask' || this.parent.type === 'regional_guidance') { this.konva.compositingRect = new Konva.Rect({ name: CanvasObjectRenderer.KONVA_COMPOSITING_RECT_NAME, - listening: false, globalCompositeOperation: 'source-in', + listening: false, + strokeEnabled: false, + perfectDrawEnabled: false, }); this.parent.konva.layer.add(this.konva.compositingRect); }