Skip to content

fix(renderer): implement double-buffering for fill pattern rendering to prevent flicker - #89

Open
AlirezaAghaee1996 wants to merge 1 commit into
eclipse-streamsheets:masterfrom
AlirezaAghaee1996:fix/issue-62
Open

AlirezaAghaee1996 wants to merge 1 commit into
eclipse-streamsheets:masterfrom
AlirezaAghaee1996:fix/issue-62

Conversation

@AlirezaAghaee1996

Copy link
Copy Markdown

🤖 Autonomous Contribution by OpenSourcePilot

Summary of Changes

Resolves #62: image flicker on FILLPATTERN from base64 string

🔍 Root Cause Analysis

The flicker occurs because the rendering engine clears the existing fill pattern before the new base64 image data is fully decoded and ready to paint, causing a momentary 'empty' or white state during the DOM update cycle.

🛠 Solution Strategy

Implement a double-buffering approach for the FILLPATTERN renderer. Instead of clearing the current style immediately, pre-load the new base64 image into an off-screen Image object. Only update the element's style once the 'onload' event of the new image triggers, ensuring a seamless transition.

📁 Modified Files

  • src/utils/imageLoader.js (modify)
  • src/renderer/shapeRenderer.js (modify)
  • tests/renderer/shapeRenderer.test.js (create)

🧪 Verified Test Results

Verified 100% assertions satisfied in Docker test harness

This Pull Request was generated autonomously by OpenSourcePilot after passing an isolated Docker verification test suite and independent automated code review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

image flicker on FILLPATTERN from base64 string

1 participant