Bug 118302

Summary: [Qt][WK1] Support direct painting without GraphicsSurface
Product: WebKit Reporter: Allan Sandfeld Jensen <allan.jensen>
Component: WebGLAssignee: Allan Sandfeld Jensen <allan.jensen>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dino, jturcotte, kenneth, kondapallykalyan, noam, zeno
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 118251    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch jturcotte: review+

Description Allan Sandfeld Jensen 2013-07-02 06:53:53 PDT
In bug #118251 I reintroduced WebGL without graphics surfaces. It does however do inefficient pixel copies from one OpenGL context to the other. A few simple changes should allow us to do more effective texture copy.
Comment 1 Allan Sandfeld Jensen 2013-07-02 06:58:02 PDT
Created attachment 205908 [details]
Patch
Comment 2 Zeno Albisser 2013-07-11 07:06:02 PDT
Comment on attachment 205908 [details]
Patch

LGTM
Comment 3 Jocelyn Turcotte 2013-07-18 05:40:33 PDT
Comment on attachment 205908 [details]
Patch

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

> Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp:257
> +#else

What happens if we're running WebKit2 in a !USE(GRAPHICS_SURFACE) build? Maybe we also need runtime detection for WK1/2.

> Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp:263
> +

Not needed.
Comment 4 Allan Sandfeld Jensen 2013-07-22 06:26:46 PDT
(In reply to comment #3)
> (From update of attachment 205908 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=205908&action=review
> 
> > Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp:257
> > +#else
> 
> What happens if we're running WebKit2 in a !USE(GRAPHICS_SURFACE) build? Maybe we also need runtime detection for WK1/2.
> 
There was a crash I have fixed, but we do not support canvas content in coordinated graphics without graphics-surfaces.
Comment 5 Allan Sandfeld Jensen 2013-07-22 06:30:48 PDT
Created attachment 207244 [details]
Patch
Comment 6 Jocelyn Turcotte 2013-07-22 06:58:10 PDT
Comment on attachment 205908 [details]
Patch

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

>>> Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp:257
>>> +#else
>> 
>> What happens if we're running WebKit2 in a !USE(GRAPHICS_SURFACE) build? Maybe we also need runtime detection for WK1/2.
> 
> There was a crash I have fixed, but we do not support canvas content in coordinated graphics without graphics-surfaces.

Ok I was wrong, paintToTextureMapper will never be called for WK2 and "textureMapper->accelerationMode() == TextureMapper::OpenGLMode" will be enough to pick the right code path.
Comment 7 Jocelyn Turcotte 2013-07-22 06:59:46 PDT
Comment on attachment 207244 [details]
Patch

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

> Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp:98
> +    bool m_canPaintDirectly;

r=me if you remove this member.
Comment 8 Allan Sandfeld Jensen 2013-07-22 07:03:41 PDT
Committed r152969: <http://trac.webkit.org/changeset/152969>