Bug 117230

Summary: [WK2][GTK] Let DrawingArea manage setAcceleratedCompositingWindowId
Product: WebKit Reporter: Gwang Yoon Hwang <yoon>
Component: WebKitGTKAssignee: Gwang Yoon Hwang <yoon>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, berto, cgarcia, commit-queue, gustavo, mrobinson
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 100341    
Attachments:
Description Flags
Patch
none
Patch
none
Rebase after r152375
none
Patch none

Description Gwang Yoon Hwang 2013-06-05 00:25:30 PDT
This is a preparation patch for Threaded Coordinated Graphics.
    
    LayerTreeHost uses a native window handle to make glContext for
    accelerated compositing. Therefore it is natural for DrawingArea to take
    responsibility for the native window handle. And, in Coordinated
    Graphics case, WebPage creates LayerTreeHost before receiving a native
    window handle from UIProcess. Therefore we need a method to set the
    native window handle to already created LayerTreeHost.
    
    This patch uses DrawingAreaProxy::setNativeCompositingSurfaceHandle
    instead of WebCoreProxy::setAcceleratedCompositingWindowId to set window
    ID for accelerated compositing.
    
    Also, this patch renames the setAcceleratedCompositingWindowId with a
    more generic name, setNativeCompositingSurfaceHandle.
    
    No new tests. No change in functionality.
Comment 1 Gwang Yoon Hwang 2013-06-06 22:56:28 PDT
Created attachment 203997 [details]
Patch
Comment 2 WebKit Commit Bot 2013-06-06 22:59:15 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 Martin Robinson 2013-06-10 18:33:17 PDT
Comment on attachment 203997 [details]
Patch

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

This change seems okay to me. I have suggestions for a few changes and after that it needs the approval of a WebKit owner.

> Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp:375
> +void DrawingAreaProxyImpl::setNativeCompositingSurfaceHandle(uint64_t handle)

May I suggest a new name: setNativeSurfaceHandleForCompositing or setCompositingNativeSurfaceHandle. This eliminates any confusion between native "compositing surface handle" or a "surface handle" for native compositing.

> Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h:99
> +#if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK)
> +    virtual void setNativeCompositingSurfaceHandle(uint64_t) { }
> +#endif
> +

This is unused for this patch, so maybe it can be removed.
Comment 4 Gwang Yoon Hwang 2013-06-26 05:17:38 PDT
Created attachment 205474 [details]
Patch
Comment 5 Gwang Yoon Hwang 2013-06-26 05:19:14 PDT
(In reply to comment #3)
> (From update of attachment 203997 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=203997&action=review
> 
> This change seems okay to me. I have suggestions for a few changes and after that it needs the approval of a WebKit owner.
> 
Sorry for late. :(

> > Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp:375
> > +void DrawingAreaProxyImpl::setNativeCompositingSurfaceHandle(uint64_t handle)
> 
> May I suggest a new name: setNativeSurfaceHandleForCompositing or setCompositingNativeSurfaceHandle. This eliminates any confusion between native "compositing surface handle" or a "surface handle" for native compositing.
>

I prefer setNativeSurfaceHandleForCompositing. I've renamed with it.
 
> > Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h:99
> > +#if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK)
> > +    virtual void setNativeCompositingSurfaceHandle(uint64_t) { }
> > +#endif
> > +
> 
> This is unused for this patch, so maybe it can be removed.
Yes, exactly. removed.
Comment 6 Gwang Yoon Hwang 2013-07-03 17:03:07 PDT
Created attachment 206037 [details]
Rebase after r152375
Comment 7 Martin Robinson 2013-07-03 19:51:26 PDT
(In reply to comment #6)
> Created an attachment (id=206037) [details]
> Rebase after r152375

The previous patch looked good to me, so if this is just a rebase, you simply need an owner to approve it.
Comment 8 Gwang Yoon Hwang 2014-12-07 11:37:21 PST
Created attachment 242761 [details]
Patch
Comment 9 WebKit Commit Bot 2014-12-08 10:46:17 PST
Comment on attachment 242761 [details]
Patch

Clearing flags on attachment: 242761

Committed r176954: <http://trac.webkit.org/changeset/176954>
Comment 10 WebKit Commit Bot 2014-12-08 10:46:21 PST
All reviewed patches have been landed.  Closing bug.