[Webkit-unassigned] [Bug 144685] [EGL] Move EGLDisplay handling to PlatformDisplay and remove PlatformDisplay definition from GLDefs.h

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 6 08:46:51 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=144685

--- Comment #9 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #3)
> > > Comment on attachment 252470 [details]
> > > Try to fix EFL build
> > > 
> > > View in context:
> > > https://bugs.webkit.org/attachment.cgi?id=252470&action=review
> > > 
> > > > Source/WebCore/platform/graphics/PlatformDisplay.cpp:139
> > > > +#if USE(OPENGL_ES_2)
> > > > +    static const EGLenum eglAPIVersion = EGL_OPENGL_ES_API;
> > > > +#else
> > > > +    static const EGLenum eglAPIVersion = EGL_OPENGL_API;
> > > > +#endif
> > > > +    if (eglBindAPI(eglAPIVersion) == EGL_FALSE) {
> > > > +        LOG_ERROR("Failed to set EGL API(%d).", eglGetError());
> > > > +        terminateEGLDisplay();
> > > > +        return;
> > > > +    }
> > > 
> > > This needs to be called once per program, not once per display. Perhaps you
> > > could surround this with std::once.
> > 
> > Display is already a single instance, so this will be called only once per
> > display, per process.
> 
> eglBindAPI isn't supposed to be called once per-display. I supposed to be
> called once.

There's only one display, so it will be called once. Anyway, I've moved the egl initializations repeated in several places here, so if it was wrong it can be fixed in a follow up patch, this patch shouldn't change any behaviour. But I insist, this is called only once per process.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150506/5e42ebc3/attachment.html>


More information about the webkit-unassigned mailing list