Skip to content
  • commit-queue@webkit.org's avatar
    [BlackBerry] Add an overlay layer · e7381707
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=87567
    
    Patch by Arvid Nilsson <anilsson@rim.com> on 2012-05-28
    Reviewed by Antonio Gomes.
    
    The overlay layer allows us to have compositing layers even though the
    web page is not currently using accelerated compositing.
    
    These layers can be used to implement tap highlight, inspector overlay
    and more.
    
    Source/WebCore:
    
    The WebCore changes support the overlay layer functionality in WebKit
    by making it possible to add animations from the compositing thread
    without them being instantly overwritten during the next commit.
    
    Also a new custom layer type is added, which allow an overlay layer to
    draw itself using raw OpenGL calls. An instance of a custom subclass of
    LayerCompositingThread must be provided when creating the
    LayerWebKitThread. Then, the custom layer can be used as the content
    layer of a GraphicsLayer, or by itself.
    
    Reviewed internally by Filip Spacek.
    
    PR #154335
    
    * platform/graphics/blackberry/LayerCompositingThread.cpp:
    (WebCore::LayerCompositingThread::~LayerCompositingThread):
    (WebCore::LayerCompositingThread::deleteTextures):
    (WebCore::LayerCompositingThread::drawTextures):
    (WebCore::LayerCompositingThread::drawMissingTextures):
    (WebCore::LayerCompositingThread::updateTextureContentsIfNeeded):
    (WebCore::LayerCompositingThread::setVisible):
    (WebCore::LayerCompositingThread::scheduleCommit):
    * platform/graphics/blackberry/LayerCompositingThread.h:
    (WebCore::LayerCompositingThread::addAnimation):
    (WebCore::LayerCompositingThread::setRunningAnimations):
    (WebCore::LayerCompositingThread::setSuspendedAnimations):
    (LayerCompositingThread):
    (WebCore::LayerCompositingThread::drawCustom):
    * platform/graphics/blackberry/LayerData.h:
    (LayerData):
    * platform/graphics/blackberry/LayerWebKitThread.cpp:
    (WebCore::LayerWebKitThread::LayerWebKitThread):
    (WebCore):
    (WebCore::LayerWebKitThread::~LayerWebKitThread):
    (WebCore::LayerWebKitThread::updateTextureContentsIfNeeded):
    (WebCore::LayerWebKitThread::startAnimations):
    (WebCore::LayerWebKitThread::commitOnCompositingThread):
    (WebCore::LayerWebKitThread::setNeedsDisplayInRect):
    (WebCore::LayerWebKitThread::setNeedsDisplay):
    (WebCore::LayerWebKitThread::setIsMask):
    (WebCore::LayerWebKitThread::setRunningAnimations):
    (WebCore::LayerWebKitThread::setSuspendedAnimations):
    * platform/graphics/blackberry/LayerWebKitThread.h:
    (LayerWebKitThread):
    
    Source/WebKit/blackberry:
    
    Reviewed internally by Filip Spacek.
    
    PR #154335
    
    * Api/WebPage.cpp:
    (BlackBerry::WebKit::WebPagePrivate::scheduleRootLayerCommit):
    (BlackBerry::WebKit::WebPagePrivate::overlayLayer):
    (WebKit):
    (BlackBerry::WebKit::WebPagePrivate::commitRootLayer):
    (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
    * Api/WebPageCompositor.cpp:
    (BlackBerry::WebKit::WebPageCompositorPrivate::setOverlayLayer):
    (WebKit):
    (BlackBerry::WebKit::WebPageCompositorPrivate::prepareFrame):
    (BlackBerry::WebKit::WebPageCompositorPrivate::render):
    (BlackBerry::WebKit::WebPageCompositorPrivate::drawLayers):
    * Api/WebPageCompositor_p.h:
    (BlackBerry::WebKit::WebPageCompositorPrivate::overlayLayer):
    (WebPageCompositorPrivate):
    * Api/WebPage_p.h:
    (WebPagePrivate):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118699 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    e7381707