Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-43106

CSS3 perspective transform does not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.3.2, 5.4.0 RC
    • WebKit
    • 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);
      }

        1. fancybrowser.png
          fancybrowser.png
          12 kB
        2. framecapture.cpp
          4 kB
        3. framecapture.png
          framecapture.png
          5 kB
        4. perspective.html
          0.3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            annulen Konstantin Tokarev
            aliosa.jankovic Aliosa Jankovic
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes