Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Clear only dirty areas of a canvas. #4659

Merged
merged 1 commit into from
Jul 24, 2018

Conversation

chenba
Copy link
Collaborator

@chenba chenba commented Jul 18, 2018

Fixes #4463

@codecov-io
Copy link

Codecov Report

Merging #4659 into master will decrease coverage by 0.04%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4659      +/-   ##
==========================================
- Coverage   42.18%   42.13%   -0.05%     
==========================================
  Files          43       43              
  Lines        1880     1882       +2     
  Branches      348      348              
==========================================
  Hits          793      793              
- Misses       1087     1089       +2
Impacted Files Coverage Δ
server/src/pages/shot/pen-tool.js 25% <0%> (ø) ⬆️
server/src/pages/shot/drawing-tool.js 10.14% <0%> (-0.31%) ⬇️
server/src/pages/shot/highlighter-tool.js 16.94% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e27cc2d...19afc33. Read the comment docs.

Copy link
Member

@jaredhirsch jaredhirsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. Seeing some weird behavior here, probably related to rounding off selection areas when undoing / redoing drawings. I'll add some screenshots.

@jaredhirsch
Copy link
Member

OK, start with an image plucked from mozilla.org:

screen shot 2018-07-18 at 2 41 51 pm

Highlight across part of the image:

screen shot 2018-07-18 at 2 42 49 pm

Undo and redo a few times. Note the blurriness and offset of the chunk that was highlighted - this only gets worse as you undo/redo some more, or undo/redo on top of additional drawing areas:

screen shot 2018-07-18 at 2 43 22 pm

As I mentioned in the review, I'm guessing this comes from rounding off subpixel distances, but maybe it also has to do with pixel density issues?

@jaredhirsch
Copy link
Member

Here's how it looks after undo/redo about 20x, ending with the highlight reapplied:

screen shot 2018-07-18 at 2 47 51 pm

@chenba
Copy link
Collaborator Author

chenba commented Jul 18, 2018

So strange that it's not reproducible on every shot. Even with two shots of identical dimensions, I'd get different results. 😕

@chenba
Copy link
Collaborator Author

chenba commented Jul 20, 2018

The issue with the blurred area is not from this PR and is now tracked in #4678.

@jaredhirsch jaredhirsch merged commit 1f6b07e into mozilla-services:master Jul 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants