Revert updatePixels() to set modified flag to true #5042

Merged
merged 1 commit into from May 2, 2017

Conversation

Projects
None yet
2 participants
@JakubValtar
Contributor

JakubValtar commented May 2, 2017

This fixes the bug for now, but uncovers a deeper issue.

PImage.modify flag is now used for two purposes and should be split into two variables:

  • internally by renderers to signal that pixels[] changed and need to be drawn
  • externally to signal other renderers that this image changed in some way and they should update their cache

When a PGraphics is drawn onto other PGraphics, both of these uses collide and may cause problems. This needs to be looked at and resolved later, probably by adding another variable (a flush counter which could be compared with couter of the cached image to tell if cache needs to be updated).

Reverts 51dff76

Fixes #5040

Revert updatePixels() to set modified flag to true
PImage.modify flag is now used for two purposes and should be split into
two variables:
- internally by renderers to signal that pixels[] changed and need to be
drawn
- externally to signal other renderers that this image changed in some
way and they should update their cache

Reverts 51dff76

Fixes #5040

@JakubValtar JakubValtar referenced this pull request May 2, 2017

Closed

tint(rgb, alpha) bug #5040

@benfry benfry merged commit 3771a52 into processing:master May 2, 2017

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry May 2, 2017

Member

Opened a new issue for that: #5043

Member

benfry commented May 2, 2017

Opened a new issue for that: #5043

@JakubValtar

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar May 2, 2017

Contributor

Sorry 'bout that. Hope it's the last problem caused by my pixelDensity update.

Contributor

JakubValtar commented May 2, 2017

Sorry 'bout that. Hope it's the last problem caused by my pixelDensity update.

@JakubValtar JakubValtar deleted the JakubValtar:hotfix-tint-npe branch May 2, 2017

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry May 3, 2017

Member

Plenty to go around… you're talking to the guy who broke keyPressed in the last release.

Member

benfry commented May 3, 2017

Plenty to go around… you're talking to the guy who broke keyPressed in the last release.

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