-
Bug
-
Resolution: Won't Do
-
P3: Somewhat important
-
None
-
5.3.2, 5.4.0 RC
-
None
The perspective transform does not work when rendering to a QImage using QPainter. The following code is copied from framecapture example for QtWebKit.
It works well in fancybrowser example (and in Google Chrome) which means there is a limitation or a bug when rendering to raster image.
I attached :
- HTML document with perspective transform I want to render
- The C++ code to render the page to a raster image
- The output image when rendering with framecapture
- The screenshot of fancybrowser
Looking into the code I've noticed that a possible fork point in 2 scenarios is in the code below. Fancybrowser will call client->renderCompositedLayers(context, clip) but framecapture does not. I don't understand very well which is the cause root of the different rendering paths. Is it possible to configure framcapture to render similar to fancybrowser?
void QWebFrameAdapter::renderCompositedLayers(WebCore::GraphicsContext* context, const WebCore::IntRect& clip)
{
WebCore::Page* page = frame->page();
if (!page)
return;
if (TextureMapperLayerClientQt* client = static_cast<ChromeClientQt*>(page->chrome().client())->m_textureMapperLayerClient.get())
client->renderCompositedLayers(context, clip);
}