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

Webkit fails to render propertly as a ShaderEffectSource

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P2: Important
    • None
    • 5.2.0
    • Quick: SceneGraph, WebKit
    • None

    Description

      Try the following code:

      You'll see flickering, bad rendering and even blank screens or teared content.

      Check out the comment for enabling and disabling.

       
      import QtQuick 2.2
      import QtWebKit 3.0
      
      Rectangle {
          width: 2000
          height: 500
      
          WebView{
              id: web
              url: "http://maps.google.com"
              anchors.fill: parent
          }
      
          Loader{
              id: loader
          }
          ShaderEffectSource{
              id: fxSource
              sourceItem: web
              //hideSource: true
              textureSize: Qt.size(512,512)
          }
          ShaderEffect {
              id: shader
              width: 500; height: 500
              property variant src: fxSource
              //visible: false  // <-----ENABLE/DISABLE THIS
              vertexShader: "
                          uniform highp mat4 qt_Matrix;
                          attribute highp vec4 qt_Vertex;
                          attribute highp vec2 qt_MultiTexCoord0;
                          varying highp vec2 coord;
                          void main() {
                              coord = qt_MultiTexCoord0;
                              gl_Position = qt_Matrix * qt_Vertex;
                          }"
              fragmentShader: "
                          varying highp vec2 coord;
                          uniform sampler2D src;
                          uniform lowp float qt_Opacity;
                          void main() {
                              lowp vec4 tex = texture2D(src, coord);
                              gl_FragColor = tex;
                          }"
              MouseArea{
                  drag.target: shader
                  drag.axis: Drag.XandYAxis
              }
          }
      }
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sletta Gunnar Sletta
            desert Ariel Molina R.
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes