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

PIXI.utils.canUseNewCanvasBlendModes() is unreliable on Chrome #2188

Closed
dtinth opened this issue Nov 8, 2015 · 3 comments
Closed

PIXI.utils.canUseNewCanvasBlendModes() is unreliable on Chrome #2188

dtinth opened this issue Nov 8, 2015 · 3 comments

Comments

@dtinth
Copy link

dtinth commented Nov 8, 2015

I found a problem on a game I’m developing using CanvasRenderer that sometimes blend mode works (in particular, the screen mode), sometimes it doesn’t.

Calling PIXI.utils.canUseNewCanvasBlendModes() on http://pixijs.github.io/examples/ (which is running Pixi.js 3.0.6) yields an unreliable result:

screen shot 2015-11-08 at 21 53 56

46.0.2490.80 (64-bit)
Mac OS X El Capitan

Since I don’t plan to support Internet Explorer right now, my workaround is to do this:

function hackPIXIToForceNewBlendModes () {
  PIXI.utils.canUseNewCanvasBlendModes = () => true
}

I suspect that the problem may be that the Image is loaded asynchronously (i.e. in another thread) but sometimes it decodes fast enough to be used synchronously. Maybe, creating an image data from scratch instead of loading from PNG files may be able to fix this.

@ivanpopelyshev
Copy link
Collaborator

Its the same as #2171 . They actually have problem in compiler, it "optimized" something. Wait for next chrome update :)

You can rewrite this test using 257x257 texture

@GoodBoyDigital
Copy link
Member

fixed in v4 👍

@lock
Copy link

lock bot commented Feb 25, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Feb 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants