Changeset 163646 in webkit


Ignore:
Timestamp:
Feb 7, 2014 2:12:03 PM (10 years ago)
Author:
dino@apple.com
Message:

WebGL doesn't update with remotely hosted layers
https://bugs.webkit.org/show_bug.cgi?id=128390

Reviewed by Simon Fraser.

PlatformCALayerRemote was intercepting the setNeedsDisplay calls to
WebGL layers, and thus causing them to not draw. Fix this by adding an
override in PlatformCALayerRemoteCustom to check if it is a WebGLLayer
and call setNeedsDisplay directly.

  • WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
  • WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:

(PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
(PlatformCALayerRemoteCustom::setNeedsDisplay):

Location:
trunk/Source/WebKit2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r163645 r163646  
     12014-02-07  Dean Jackson  <dino@apple.com>
     2
     3        WebGL doesn't update with remotely hosted layers
     4        https://bugs.webkit.org/show_bug.cgi?id=128390
     5
     6        Reviewed by Simon Fraser.
     7
     8        PlatformCALayerRemote was intercepting the setNeedsDisplay calls to
     9        WebGL layers, and thus causing them to not draw. Fix this by adding an
     10        override in PlatformCALayerRemoteCustom to check if it is a WebGLLayer
     11        and call setNeedsDisplay directly.
     12
     13        * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
     14        * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
     15        (PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
     16        (PlatformCALayerRemoteCustom::setNeedsDisplay):
     17
    1182014-02-07  Benjamin Poulain  <bpoulain@apple.com>
    219
  • trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h

    r163079 r163646  
    4242    virtual uint32_t hostingContextID() override;
    4343
     44    virtual void setNeedsDisplay(const WebCore::FloatRect* dirtyRect = 0) override;
     45
    4446private:
    4547    PlatformCALayerRemoteCustom(PlatformLayer*, WebCore::PlatformCALayerClient* owner, RemoteLayerTreeContext*);
     
    4749    std::unique_ptr<LayerHostingContext> m_layerHostingContext;
    4850    RetainPtr<PlatformLayer> m_platformLayer;
     51    bool m_providesContents;
    4952};
    5053
  • trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm

    r163218 r163646  
    5858    m_platformLayer = customLayer;
    5959    [customLayer web_disableAllActions];
     60
     61    m_providesContents = [customLayer isKindOfClass:NSClassFromString(@"WebGLLayer")];
    6062}
    6163
     
    6870    return m_layerHostingContext->contextID();
    6971}
     72
     73void PlatformCALayerRemoteCustom::setNeedsDisplay(const FloatRect* rect)
     74{
     75    if (m_providesContents) {
     76        if (rect)
     77            [m_platformLayer setNeedsDisplayInRect:*rect];
     78        else
     79            [m_platformLayer setNeedsDisplay];
     80    } else
     81        PlatformCALayerRemote::setNeedsDisplay(rect);
     82}
Note: See TracChangeset for help on using the changeset viewer.