8000 Run Flutter with Color Correct Skia · Issue #8152 · flutter/flutter · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Run Flutter with Color Correct Skia #8152

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

Closed
mattsarett opened this issue Feb 14, 2017 · 12 comments
Closed

Run Flutter with Color Correct Skia #8152

mattsarett opened this issue Feb 14, 2017 · 12 comments
Assignees

Comments

@mattsarett
Copy link
Contributor

No description provided.

@eseidelGoogle
Copy link
Contributor

I'm not sure what to do with this bug (if anything)? Do you still want it open?

@mattsarett
Copy link
Contributor Author

I'm looking to use it as a progress tracker for myself. Is this not a good use of the issue system? Are you able to assign it to me?

@eseidelGoogle
Copy link
Contributor

Tracking related CLs is a totally fine use of the issue system. :) Just wasn't quite sure what this was for (if we had to do something, etc.)

@mattsarett
Copy link
Contributor Author
mattsarett commented Feb 16, 2017

I've started preparing a CL for Android:
mattsarett/engine@e0194c6

This will depend on flutter/engine#3417.

@chinmaygarde I'm a little bit stuck trying to figure out how to set the egl attributes based on what the GrContext supports. Any thoughts?

@brianosman

@chinmaygarde
Copy link
Member
chinmaygarde commented Feb 16, 2017

We create the GrContext after the EGL attributes are set. What EGL attribute keys do you require? Also, it might be easier to get started with iOS first since all you would need to do there is set the [kEAGLColorFormatSRGBA8] on the layers color format property. I am not too sure about EGL to be hones. Would need to look it up and get back to you.

@chinmaygarde
Copy link
Member

Oh, nevermind. I just noticed the keys in your patch.

@chinmaygarde
Copy link
Member

How about we try to create both the window and pbuffer surfaces with the attributes in your patch. In case of failure, those calls probably return EGL_BAD_ATTRIBUTE (have you checked on a device that does not support the same?). In that case, we try again without those keys. In both cases, EGLContext can make a note of the accepted configuration. Then, when we are creating the GrContext, ask that instance for its configuration.

@mattsarett
Copy link
Contributor Author

So it's my understanding that...
(A) It is possible for the GrContext to indicate that GL supports sRGB - but the EGL attributes fail (I think you're right, we'd get EGL_BAD_ATTRIBUTE.
(B) It is also possible for the GrContext to not support sRGB - but the EGL attributes are fine.

I think that I need to try something like...
(1) Create GrContext - check if sRGB is supported
(2) Create the EGL surfaces - check if sRGB is supported
(3) Only create the SkSurface with a color space if (1) and (2) are true

@chinmaygarde
Copy link
Member

It might be a good idea to have the GrContext be created at the same time as the EGL surface.

  • Create window or pbuffer surface with the SRGB attribute set, then create the GrContext indicating SRGB support as well.
  • If successful, SRGB support is present or enabled. If not, toss away both the EGL surface and the GrContext and try again without support in both.

Right now, GrContext is created separately from the where the EGL surfaces are held (in AndroidContextGL). Maybe AndroidContextGL can also create the sk_sp that the platform can use (instead of creating one of its own).

@mattsarett
Copy link
Contributor Author

sgtm, I'll give that a shot.

@Hixie
Copy link
Contributor
Hixie commented Apr 24, 2018

Closing. We experimented with color correctness and I believe ended up at a place we are happy with.

@Hixie Hixie closed this as completed Apr 24, 2018
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this issue Mar 13, 2019
willlarche pushed a commit that referenced this issue Mar 13, 2019
* 59715b7 Disable build_ios task due to lack of credits. (flutter/engine#8150)

* 9f50dae Look up ICU symbols based on the path to libflutter.so as a fallback (flutter/engine#8139)

* 8b1a299 [Skia] Rollback Skia to 29d5dec9a0783a033b921dc483fb98d565d684f6 (flutter/engine#8151)

* 8be2aca Roll src/third_party/dart 1bd36d694d..674fd0e060 (48 commits) #8152

* 2e42703 Revert "Disable build_ios task due to lack of credits. (#8150)" (flutter/engine#8153)

* 2daebeb Fix text.dart height docs (flutter/engine#8079)

* b1b388f Encode scroll motion events in the Android touch processor (flutter/engine#8149)
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 17, 2021
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

4 participants
0