MCPcopy
hub / github.com/processing/p5.js / _getCanvasColorTextureView

Method _getCanvasColorTextureView

src/webgpu/p5.RendererWebGPU.js:560–568  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

558 }
559
560 _getCanvasColorTextureView() {
561 const canvasTexture = this.drawingContext.getCurrentTexture();
562 // If texture changed (new frame), update cache
563 if (this.currentCanvasColorTexture !== canvasTexture) {
564 this.currentCanvasColorTexture = canvasTexture;
565 this.currentCanvasColorTextureView = canvasTexture.createView();
566 }
567 return this.currentCanvasColorTextureView;
568 }
569
570 _beginActiveRenderPass() {
571 if (this.activeRenderPass) return;

Callers 2

clearMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected