[webkit-reviews] review canceled: [Bug 78672] [Texmap] Move TextureMapperGL to use GraphicsContext3D : [Attachment 154818] RenderToCurrentGLContext/GC3DQt - try fix Cr

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Aug 12 14:56:32 PDT 2012


Roland Takacs <rtakacs at inf.u-szeged.hu> has canceled Helder Correia
<helder.correia at nokia.com>'s request for review:
Bug 78672: [Texmap] Move TextureMapperGL to use GraphicsContext3D
https://bugs.webkit.org/show_bug.cgi?id=78672

Attachment 154818: RenderToCurrentGLContext/GC3DQt - try fix Cr
https://bugs.webkit.org/attachment.cgi?id=154818&action=review

------- Additional Comments from Roland Takacs <rtakacs at inf.u-szeged.hu>
Must not to call "makeContextCurrent()" when we would like to use functions
that wrapped by GraphicsContext3D. Else it does not draw.

> bool GraphicsContext3D::makeContextCurrent()
> {
>    if (!m_private || m_renderStyle == RenderToCurrentGLContext)
>	  return false;
>
>    return m_private->makeCurrentIfNeeded();
> }

m_renderStyle indicates we want to call GC3D functions within WebKit code (like
TextureMapper).

When there is no hostWindow (e.g. renderStyle is RenderToCurrentGLContext) must
not to release m_surface at the ~GraphicsContext3DPrivate.

> if (renderStyle == GraphicsContext3D::RenderToCurrentGLContext) {
>	 m_platformContext = QOpenGLContext::currentContext();	<< QUERY
>	 m_surface = m_platformContext->surface();  << QUERY
>	 return;
> }

You can see if there is not hostWindow m_platformContext and m_surface are not
created only queried.
So I inserted a check mechanism to eliminat unwanted release. Else there is a
nice sefault :)

> GraphicsContext3DPrivate::~GraphicsContext3DPrivate()
> {
>     if (m_hostWindow) {
>	  delete m_surface;
>	  m_surface = 0;
>	  // Platform context is assumed to be owned by surface.
>	  m_platformContext = 0;
>     }
>  }

Who created m_platformContext and m_surface will destroy them. 

Finally I added a new constant to GraphicsContext3D macros that is BGRA. When I
updated the patch for now I found GL_BGRA within TextureMapperGL.cpp.
Because it was not defined I defined it :)


More information about the webkit-reviews mailing list