Bug 56339 - [Qt] WebGL content not shown when accelerated compositing is enabled
Summary: [Qt] WebGL content not shown when accelerated compositing is enabled
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P5 Normal
Assignee: Nobody
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2011-03-14 14:46 PDT by Jarkko Sakkinen
Modified: 2011-03-16 17:58 PDT (History)
8 users (show)

See Also:


Attachments
Fixes the issue by adapting to internal API changes. (12.07 KB, patch)
2011-03-15 07:24 PDT, Jarkko Sakkinen
no flags Details | Formatted Diff | Diff
Made adjustments mentioned in comments section (11.31 KB, patch)
2011-03-16 10:59 PDT, Jarkko Sakkinen
no flags Details | Formatted Diff | Diff
forgot changelog entry from previous patch. (12.58 KB, patch)
2011-03-16 11:05 PDT, Jarkko Sakkinen
kenneth: review+
kenneth: commit-queue-
Details | Formatted Diff | Diff
Added description what the changeset actually does. (12.84 KB, patch)
2011-03-16 14:51 PDT, Jarkko Sakkinen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jarkko Sakkinen 2011-03-14 14:46:21 PDT
Before, the class GraphicsLayer had functions:

    virtual void setContentsToGraphicsContext3D(const GraphicsContext3D*);
    virtual void setGraphicsContext3DNeedsDisplay();

Now these are gone and a new function have been added:

    virtual void setContentsToCanvas(PlatformLayer*);

This causes a problem because PlatformLayer is defined as QGraphicsObject. This gives no way to acquire FBO texture of GraphicsContext3D.
Comment 1 Jarkko Sakkinen 2011-03-14 15:52:25 PDT
Internal QGraphicsObject derived class that blits the FBO into QPixmap might solve this. I'm going to try out this solution.
Comment 2 Jarkko Sakkinen 2011-03-14 16:04:58 PDT
I'm going to try following:

- Remove deprecated functions from GraphicsLayerQt (see description)
- Remove Canvas3DContentType and all the code that uses it.
- Implement setContentsToCanvas() that simply calls setContentsToMedia().
- Inside GraphicsContext3DQt.cpp create QGraphicsObject implementation.
Comment 3 Jarkko Sakkinen 2011-03-15 04:18:37 PDT
Started writing fix for this issue. I hope I'll get something out tomorrow.
Comment 4 Jarkko Sakkinen 2011-03-15 05:51:34 PDT
Initial implementation works (fixes the issue) but patch is not ready *yet*. Time to test how call sequences go with different options.
Comment 5 Jarkko Sakkinen 2011-03-15 06:59:49 PDT
Update: I adjusted code so that only for accelerated compositing texture mapping is used. For other cases memory copy is used. The point for this is that only with that configuration the direct texture mapping is stable with transformations of the webkit rendering pipeline. I think this is how it should work. Conservative support for non accelerated pipeline and GPU assisted blitting for accelerated compositing pipeline.
Comment 6 Jarkko Sakkinen 2011-03-15 07:01:00 PDT
At least that is the best compromise in order to get this releasable state :)
Comment 7 Jarkko Sakkinen 2011-03-15 07:17:55 PDT
Tested that calls only paint() and paintIntoCanvas() when AC is enabled. Seems to work correctly.
Comment 8 Jarkko Sakkinen 2011-03-15 07:24:22 PDT
Created attachment 85802 [details]
Fixes the issue by adapting to internal API changes.

Direct texture mapping enabled only for AC with QGLWidget viewport case. Other cases use memory copy.
Comment 9 Noam Rosenthal 2011-03-15 09:15:31 PDT
LGTM
Comment 10 Jarkko Sakkinen 2011-03-16 07:53:28 PDT
I'll revise the patch a bit:
- There was a merge conflict in GraphicsContext3DQt.cpp with latest upstream version. Fixing this.
- Removing #include "GraphicsContext3D.h" from GraphicsLayerQt.h. Not needed anymore.
Comment 11 Jarkko Sakkinen 2011-03-16 10:59:18 PDT
Created attachment 85941 [details]
Made adjustments mentioned in comments section
Comment 12 Jarkko Sakkinen 2011-03-16 11:05:49 PDT
Created attachment 85943 [details]
forgot changelog entry from previous patch.
Comment 13 Kenneth Rohde Christiansen 2011-03-16 12:37:38 PDT
Comment on attachment 85943 [details]
forgot changelog entry from previous patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=85943&action=review

> Source/WebCore/ChangeLog:7
> +

Would be good with a bit of summary of what you actually did
Comment 14 Jarkko Sakkinen 2011-03-16 14:51:01 PDT
Created attachment 85982 [details]
Added description what the changeset actually does.

I think it now describes in a nutshell what is happening.
Comment 15 Kenneth Rohde Christiansen 2011-03-16 14:55:22 PDT
(In reply to comment #14)
> Created an attachment (id=85982) [details]
> Added description what the changeset actually does.
> 
> I think it now describes in a nutshell what is happening.

Great! :-)
Comment 16 WebKit Commit Bot 2011-03-16 17:16:40 PDT
Comment on attachment 85982 [details]
Added description what the changeset actually does.

Clearing flags on attachment: 85982

Committed r81298: <http://trac.webkit.org/changeset/81298>
Comment 17 WebKit Commit Bot 2011-03-16 17:16:44 PDT
All reviewed patches have been landed.  Closing bug.
Comment 18 WebKit Review Bot 2011-03-16 17:58:21 PDT
http://trac.webkit.org/changeset/81298 might have broken SnowLeopard Intel Release (Tests)
The following tests are not passing:
http/tests/filesystem/resolve-uri.html