Closed Bug 734081 Opened 8 years ago Closed 8 years ago
Check pixel depth when choosing config on egl
Turns out the Nexus S gets upset when we try to use 16bit surfaces on B2G. Android is fixed at 16bit but I think they all support 16bit anyway. I can switch to proper detection if someone finds a way to do it. However, the docs say: "By default GLSurfaceView chooses a EGLConfig that has an RGB_565 pixel format, with at least a 16-bit depth buffer and no stencil." so we should be ok forcing 16bit.
Attachment #604063 - Flags: review?(jones.chris.g)
Comment on attachment 604063 [details] [diff] [review] Check pixel depth when choosing config on egl >diff --git a/gfx/gl/GLContextProviderEGL.cpp b/gfx/gl/GLContextProviderEGL.cpp >+ nsCOMPtr<nsIScreenManager> screenMgr = do_GetService("@mozilla.org/gfx/screenmanager;1"); >+ nsCOMPtr<nsIScreen> screen; >+ screenMgr->GetPrimaryScreen(getter_AddRefs(screen)); >+ PRInt32 depth = 24; >+ screen->GetColorDepth(&depth); > Yay XPCOM! Does this work on akami/maguro?
Attachment #604063 - Flags: review?(jones.chris.g) → review+
(In reply to Chris Jones [:cjones] [:warhammer] from comment #1) > Yay XPCOM! > :( > Does this work on akami/maguro? Yeah I checked and my akami picks a 16bit surface.
Target Milestone: --- → mozilla13
Backed out due to Android reftest failures. https://hg.mozilla.org/integration/mozilla-inbound/rev/e0b4c4897e0e
https://hg.mozilla.org/integration/mozilla-inbound/rev/d5222ee0a6dc Offending reftest disabled on Android.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.