[Webkit-unassigned] [Bug 101291] [EFL] Refactor GraphicsContext3DEFL
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Nov 20 00:42:51 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=101291
--- Comment #54 from Kalyan <kalyan.kondapally at intel.com> 2012-11-20 00:44:47 PST ---
(In reply to comment #53)
> (In reply to comment #52)
> t());
>
> > Sorry, I didnt check this properly before. This is completely wrong. We need to first make the context current before checking the status(if we have a valid context or not).
> > so basically it goes as follows:
> > 1)Make the context current with the given surface. i.e. m_platformContext->makeCurrent(m_platformSurface.get())
> > 2)Check if the first step succeeded and we still have a valid context.
> > 3)return true if the above two conditions are met else false
> >
> > If the changes are done in PlatformContext(as discussed above to return isValid()), then steps 1 and 2 are merged into one.
> >
> > Than we have something like:
> > bool GraphicsContext3DPrivate::makeContextCurrent()
> > {
> > bool success = m_platformContext->makeCurrent(m_platformSurface.get());
> >
> > if (!success && m_contextLostCallback) {
> > m_contextLostCallback->onContextLost();
> > // FIXME: Restore context
> > }
> >
> > return success;
> > }
>
> Yes, this code make sense now. Thanks.
Unable to make a context current and a context being reset are two different things. We need to explicitly check for both and I don't feel right to merge them into one
Something like this would be more fool proof:
bool GraphicsContext3DPrivate::makeContextCurrent()
{
bool success = m_platformContext->makeCurrent(m_platformSurface.get());
if (!success && !m_platformContext->isValid() && m_contextLostCallback) {
m_contextLostCallback->onContextLost();
// FIXME: Restore context
}
return success;
}
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list