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

Use Workers to do tile decompression and unpremultiply #9208

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Cwiiis
Copy link
Contributor

@Cwiiis Cwiiis commented Jun 3, 2024

  • Resolves: #
  • Target version: master

Summary

Two patches; the first fixes a bug where if we receive new keyframe tiledata and need to ensure the canvas, we end up decompressing/unpremultiplying/putting the old data unnecessarily (I think). The second uses a worker to offload the majority of tile image data decompression and unpremultiplying from the main thread and improves response during large update operations (such as scrolling through a document).

The code is not properly formatted yet, I'm opening this PR now and will update it with fixes once I figure out what those fixes are...

Checklist

  • Code is properly formatted
  • All commits have Change-Id
  • I have run tests with make check
  • I have issued make run and manually verified that everything looks okay
  • Documentation (manuals or wiki) has been updated or is not required

Copy link

welcome bot commented Jun 3, 2024

Thanks for opening this pull request!

Things that will help get your PR across the finish line:

@Cwiiis Cwiiis force-pushed the messing-with-workers branch 3 times, most recently from 3430ea8 to f6b9b8e Compare June 5, 2024 15:09
browser/src/core/MessagePreProcessor.js Fixed Show fixed Hide fixed
break;

default:
console.error('Unrecognised preprocessor message', e);

Check warning

Code scanning / CodeQL

Log injection Medium

Log entry depends on a
user-provided value
.

console.log('MessagePreProcessor initialised', self.fzstd);

function onMessage(e) {

Check warning

Code scanning / CodeQL

Missing origin verification in `postMessage` handler Medium

Postmessage handler has no origin check.
Signed-off-by: Chris Lord <[email protected]>
Change-Id: Idb46053e78fb44225f3f1b2a86b7ccaaf52310b2
Signed-off-by: Chris Lord <[email protected]>
Change-Id: I67a3a400009f03c7a87fb17040c224f8e6c9ded9
This removes unpremultiply from the retained allocations profile. This
doesn't necessarily help with memory usage, but at least makes it easier
to track.

Signed-off-by: Chris Lord <[email protected]>
Change-Id: I8d4a81ec6a9e771d6a37c293e3a130da0b6637d9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To Review
Development

Successfully merging this pull request may close these issues.

None yet

1 participant