[Qt] Fix issues when using the WebView as ShaderEffectSource
https://bugs.webkit.org/show_bug.cgi?id=83587
Reviewed by Noam Rosenthal.
Source/WebCore:
- Make sure that the bound frame buffer is preserved instead of binding
to the default one
- Accept a "mirrored" flag in beginPainting that we're applying on the
projection matrix just as with internal FBOs
The "flip" logic in createProjectionMatrix has been reversed and renamed to
mirrored so that FBO rendering is considered the special case and not the
other way around just like within Qt.
* platform/graphics/texmap/TextureMapper.h:
(WebCore::TextureMapper::beginPainting):
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGLData::TextureMapperGLData):
(TextureMapperGLData):
(WebCore::TextureMapperGL::beginPainting):
(WebCore::createProjectionMatrix):
(WebCore::BitmapTextureGL::bind):
(WebCore::TextureMapperGL::bindSurface):
* platform/graphics/texmap/TextureMapperGL.h:
Source/WebKit2:
Qt is going to mirror the projection matrix when the shader effect source
is grabbed. Detect that the matrix is mirrored and pass on this information
to TextureMapper so that it can do the same.
* UIProcess/WebLayerTreeRenderer.cpp:
(WebKit::WebLayerTreeRenderer::paintToCurrentGLContext):
* UIProcess/WebLayerTreeRenderer.h:
(WebLayerTreeRenderer):
* UIProcess/qt/QtWebPageSGNode.cpp:
(WebKit::ContentsSGNode::render):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113859
268f45cc-cd09-0410-ab3c-
d52691b4dbfc