[BlackBerry] Add an overlay layer

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
parent fab40c08
2012-05-28 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] Add an overlay layer
https://bugs.webkit.org/show_bug.cgi?id=87567
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.
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):
2012-05-28 Leo Yang <leo.yang@torchmobile.com.cn>
ProgressEvent JSC binding should have no static table
......
......@@ -75,7 +75,8 @@ LayerCompositingThread::~LayerCompositingThread()
{
ASSERT(isCompositingThread());
m_tiler->layerCompositingThreadDestroyed();
if (m_tiler)
m_tiler->layerCompositingThreadDestroyed();
ASSERT(!superlayer());
......@@ -106,7 +107,8 @@ void LayerCompositingThread::deleteTextures()
{
releaseTextureResources();
m_tiler->deleteTextures();
if (m_tiler)
m_tiler->deleteTextures();
}
void LayerCompositingThread::setDrawTransform(const TransformationMatrix& matrix)
......@@ -256,7 +258,15 @@ void LayerCompositingThread::drawTextures(int positionLocation, int texCoordLoca
return;
}
m_tiler->drawTextures(this, positionLocation, texCoordLocation);
if (m_layerType == CustomLayer) {
// Custom layers don't have a LayerTiler, so they either have to set
// m_texID or implement drawCustom.
drawCustom(positionLocation, texCoordLocation);
return;
}
if (m_tiler)
m_tiler->drawTextures(this, positionLocation, texCoordLocation);
}
void LayerCompositingThread::drawSurface(const TransformationMatrix& drawTransform, LayerCompositingThread* mask, int positionLocation, int texCoordLocation)
......@@ -295,7 +305,8 @@ void LayerCompositingThread::drawMissingTextures(int positionLocation, int texCo
return;
#endif
m_tiler->drawMissingTextures(this, positionLocation, texCoordLocation);
if (m_tiler)
m_tiler->drawMissingTextures(this, positionLocation, texCoordLocation);
}
void LayerCompositingThread::releaseTextureResources()
......@@ -418,7 +429,8 @@ void LayerCompositingThread::updateTextureContentsIfNeeded()
return;
#endif
m_tiler->uploadTexturesIfNeeded();
if (m_tiler)
m_tiler->uploadTexturesIfNeeded();
}
void LayerCompositingThread::setVisible(bool visible)
......@@ -436,7 +448,8 @@ void LayerCompositingThread::setVisible(bool visible)
return;
#endif
m_tiler->layerVisibilityChanged(visible);
if (m_tiler)
m_tiler->layerVisibilityChanged(visible);
}
void LayerCompositingThread::setNeedsCommit()
......@@ -447,6 +460,9 @@ void LayerCompositingThread::setNeedsCommit()
void LayerCompositingThread::scheduleCommit()
{
if (!m_tiler)
return;
if (!isWebKitThread()) {
if (m_commitScheduled)
return;
......
......@@ -36,6 +36,7 @@
#if USE(ACCELERATED_COMPOSITING)
#include "FloatQuad.h"
#include "LayerAnimation.h"
#include "LayerData.h"
#include "LayerRendererSurface.h"
#include "LayerTiler.h"
......@@ -139,9 +140,15 @@ public:
bool hasVisibleHolePunchRect() const;
void addAnimation(LayerAnimation* animation) { m_runningAnimations.append(animation); }
void setRunningAnimations(const Vector<RefPtr<LayerAnimation> >& animations) { m_runningAnimations = animations; }
void setSuspendedAnimations(const Vector<RefPtr<LayerAnimation> >& animations) { m_suspendedAnimations = animations; }
protected:
virtual ~LayerCompositingThread();
virtual void drawCustom(int positionLocation, int texCoordLocation) { }
private:
LayerCompositingThread(LayerType, PassRefPtr<LayerTiler>);
......@@ -183,6 +190,8 @@ private:
bool m_commitScheduled;
RefPtr<LayerTiler> m_tiler;
Vector<RefPtr<LayerAnimation> > m_runningAnimations;
Vector<RefPtr<LayerAnimation> > m_suspendedAnimations;
};
} // namespace WebCore
......
......@@ -37,7 +37,6 @@
#include "FloatPoint.h"
#include "FloatRect.h"
#include "IntRect.h"
#include "LayerAnimation.h"
#include "PlatformString.h"
#include "TransformationMatrix.h"
#include <wtf/HashMap.h>
......@@ -54,7 +53,7 @@ class MediaPlayer;
class LayerData {
public:
enum LayerType { Layer, TransformLayer, WebGLLayer, CanvasLayer };
enum LayerType { Layer, TransformLayer, WebGLLayer, CanvasLayer, CustomLayer };
enum FilterType { Linear, Nearest, Trilinear, Lanczos };
enum LayerProgramShader { LayerProgramShaderRGBA = 0,
LayerProgramShaderBGRA,
......@@ -191,8 +190,6 @@ protected:
pthread_mutex_t* m_frontBufferLock;
Vector<RefPtr<LayerAnimation> > m_runningAnimations;
Vector<RefPtr<LayerAnimation> > m_suspendedAnimations;
double m_suspendTime;
unsigned m_doubleSided : 1;
......
......@@ -63,11 +63,25 @@ LayerWebKitThread::LayerWebKitThread(LayerType type, GraphicsLayerBlackBerry* ow
, m_scale(1.0)
, m_isDrawable(false)
, m_isMask(false)
, m_animationsChanged(false)
{
m_tiler = LayerTiler::create(this);
if (type == Layer)
m_tiler = LayerTiler::create(this);
m_layerCompositingThread = LayerCompositingThread::create(type, m_tiler);
}
LayerWebKitThread::LayerWebKitThread(PassRefPtr<LayerCompositingThread> layerCompositingThread, GraphicsLayerBlackBerry* owner)
: LayerData(CustomLayer)
, m_owner(owner)
, m_superlayer(0)
, m_contents(0)
, m_scale(1.0)
, m_isDrawable(false)
, m_isMask(false)
{
m_layerCompositingThread = layerCompositingThread;
}
LayerWebKitThread::~LayerWebKitThread()
{
m_layerCompositingThread->clearAnimations();
......@@ -75,7 +89,8 @@ LayerWebKitThread::~LayerWebKitThread()
if (m_frontBufferLock)
pthread_mutex_destroy(m_frontBufferLock);
m_tiler->layerWebKitThreadDestroyed();
if (m_tiler)
m_tiler->layerWebKitThreadDestroyed();
// Our superlayer should be holding a reference to us so there should be no
// way for us to be destroyed while we still have a superlayer.
......@@ -167,7 +182,8 @@ void LayerWebKitThread::createFrontBufferLock()
void LayerWebKitThread::updateTextureContentsIfNeeded()
{
m_tiler->updateTextureContentsIfNeeded(m_isMask ? 1.0 : contentsScale());
if (m_tiler)
m_tiler->updateTextureContentsIfNeeded(m_isMask ? 1.0 : contentsScale());
}
void LayerWebKitThread::setContents(Image* contents)
......@@ -226,6 +242,7 @@ void LayerWebKitThread::startAnimations(double time)
{
for (size_t i = 0; i < m_runningAnimations.size(); ++i) {
if (!m_runningAnimations[i]->startTime()) {
m_animationsChanged = true;
m_runningAnimations[i]->setStartTime(time);
notifyAnimationStarted(time);
}
......@@ -278,9 +295,15 @@ void LayerWebKitThread::commitOnCompositingThread()
m_position += m_absoluteOffset;
// Copy the base variables from this object into m_layerCompositingThread
replicate(m_layerCompositingThread.get());
if (m_animationsChanged) {
m_layerCompositingThread->setRunningAnimations(m_runningAnimations);
m_layerCompositingThread->setSuspendedAnimations(m_suspendedAnimations);
m_animationsChanged = false;
}
m_position = oldPosition;
updateLayerHierarchy();
m_tiler->commitPendingTextureUploads();
if (m_tiler)
m_tiler->commitPendingTextureUploads();
size_t listSize = m_sublayers.size();
for (size_t i = 0; i < listSize; i++)
......@@ -424,13 +447,15 @@ void LayerWebKitThread::setSublayers(const Vector<RefPtr<LayerWebKitThread> >& s
void LayerWebKitThread::setNeedsDisplayInRect(const FloatRect& dirtyRect)
{
m_tiler->setNeedsDisplay(dirtyRect);
if (m_tiler)
m_tiler->setNeedsDisplay(dirtyRect);
setNeedsCommit(); // FIXME: Replace this with a more targeted message for dirty rect handling with plugin content?
}
void LayerWebKitThread::setNeedsDisplay()
{
m_tiler->setNeedsDisplay();
if (m_tiler)
m_tiler->setNeedsDisplay();
setNeedsCommit(); // FIXME: Replace this with a more targeted message for dirty rect handling with plugin content?
}
......@@ -448,10 +473,24 @@ void LayerWebKitThread::updateLayerHierarchy()
void LayerWebKitThread::setIsMask(bool isMask)
{
m_isMask = isMask;
if (isMask)
if (isMask && m_tiler)
m_tiler->disableTiling(true);
}
void LayerWebKitThread::setRunningAnimations(const Vector<RefPtr<LayerAnimation> >& animations)
{
m_runningAnimations = animations;
m_animationsChanged = true;
setNeedsCommit();
}
void LayerWebKitThread::setSuspendedAnimations(const Vector<RefPtr<LayerAnimation> >& animations)
{
m_suspendedAnimations = animations;
m_animationsChanged = true;
setNeedsCommit();
}
}
#endif // USE(ACCELERATED_COMPOSITING)
......@@ -36,6 +36,7 @@
#if USE(ACCELERATED_COMPOSITING)
#include "GraphicsLayerBlackBerry.h"
#include "LayerAnimation.h"
#include "LayerData.h"
#include "LayerTiler.h"
......@@ -142,12 +143,15 @@ public:
void setNeedsCommit();
void notifyAnimationStarted(double time);
void setRunningAnimations(const Vector<RefPtr<LayerAnimation> >& animations) { m_runningAnimations = animations; setNeedsCommit(); }
void setSuspendedAnimations(const Vector<RefPtr<LayerAnimation> >& animations) { m_suspendedAnimations = animations; setNeedsCommit(); }
void setRunningAnimations(const Vector<RefPtr<LayerAnimation> >&);
void setSuspendedAnimations(const Vector<RefPtr<LayerAnimation> >&);
protected:
LayerWebKitThread(LayerType, GraphicsLayerBlackBerry* owner);
// Create a custom Layer{WebKitThread, CompositingThread} pair, used when you need to subclass both.
LayerWebKitThread(PassRefPtr<LayerCompositingThread>, GraphicsLayerBlackBerry* owner);
void setNeedsTexture(bool needsTexture) { m_needsTexture = needsTexture; }
void setLayerProgramShader(LayerData::LayerProgramShader shader) { m_layerProgramShader = shader; }
void createFrontBufferLock();
......@@ -178,6 +182,9 @@ private:
GraphicsLayerBlackBerry* m_owner;
Vector<RefPtr<LayerAnimation> > m_runningAnimations;
Vector<RefPtr<LayerAnimation> > m_suspendedAnimations;
Vector<RefPtr<LayerWebKitThread> > m_sublayers;
LayerWebKitThread* m_superlayer;
RefPtr<LayerWebKitThread> m_maskLayer;
......@@ -189,8 +196,9 @@ private:
RefPtr<LayerTiler> m_tiler;
FloatSize m_absoluteOffset;
double m_scale; // Scale applies only to content layers
bool m_isDrawable;
bool m_isMask;
unsigned m_isDrawable : 1;
unsigned m_isMask : 1;
unsigned m_animationsChanged : 1;
};
}
......
......@@ -5582,7 +5582,7 @@ void WebPagePrivate::drawLayersOnCommit()
void WebPagePrivate::scheduleRootLayerCommit()
{
if (!m_frameLayers || !m_frameLayers->hasLayer())
if (!(m_frameLayers && m_frameLayers->hasLayer()) && !m_overlayLayer)
return;
m_needsCommit = true;
......@@ -5618,6 +5618,16 @@ LayerRenderingResults WebPagePrivate::lastCompositingResults() const
return LayerRenderingResults();
}
GraphicsLayer* WebPagePrivate::overlayLayer()
{
// The overlay layer has no GraphicsLayerClient, it's just a container
// for various overlays.
if (!m_overlayLayer)
m_overlayLayer = GraphicsLayer::create(0);
return m_overlayLayer.get();
}
void WebPagePrivate::setCompositor(PassRefPtr<WebPageCompositorPrivate> compositor)
{
using namespace BlackBerry::Platform;
......@@ -5647,16 +5657,34 @@ void WebPagePrivate::commitRootLayer(const IntRect& layoutRectForCompositing,
WTF_PRETTY_FUNCTION, m_compositor.get());
#endif
if (!m_frameLayers || !m_compositor)
if (!m_compositor)
return;
if (m_frameLayers->rootLayer() && m_frameLayers->rootLayer()->layerCompositingThread() != m_compositor->rootLayer())
m_compositor->setRootLayer(m_frameLayers->rootLayer()->layerCompositingThread());
// Frame layers
LayerWebKitThread* rootLayer = 0;
if (m_frameLayers)
rootLayer = m_frameLayers->rootLayer();
if (rootLayer && rootLayer->layerCompositingThread() != m_compositor->rootLayer())
m_compositor->setRootLayer(rootLayer->layerCompositingThread());
// Overlay layers
LayerWebKitThread* overlayLayer = 0;
if (m_overlayLayer)
overlayLayer = m_overlayLayer->platformLayer();
if (overlayLayer && overlayLayer->layerCompositingThread() != m_compositor->overlayLayer())
m_compositor->setOverlayLayer(overlayLayer->layerCompositingThread());
m_compositor->setLayoutRectForCompositing(layoutRectForCompositing);
m_compositor->setContentsSizeForCompositing(contentsSizeForCompositing);
m_compositor->setDrawsRootLayer(drawsRootLayer);
m_compositor->commit(m_frameLayers->rootLayer());
if (rootLayer)
rootLayer->commitOnCompositingThread();
if (overlayLayer)
overlayLayer->commitOnCompositingThread();
}
bool WebPagePrivate::commitRootLayerIfNeeded()
......@@ -5677,7 +5705,7 @@ bool WebPagePrivate::commitRootLayerIfNeeded()
if (!m_needsCommit)
return false;
if (!m_frameLayers || !m_frameLayers->hasLayer())
if (!(m_frameLayers && m_frameLayers->hasLayer()) && !m_overlayLayer)
return false;
FrameView* view = m_mainFrame->view();
......@@ -5702,8 +5730,12 @@ bool WebPagePrivate::commitRootLayerIfNeeded()
if (m_rootLayerCommitTimer->isActive())
m_rootLayerCommitTimer->stop();
m_frameLayers->commitOnWebKitThread(currentScale());
double scale = currentScale();
if (m_frameLayers && m_frameLayers->hasLayer())
m_frameLayers->commitOnWebKitThread(scale);
updateDelegatedOverlays();
if (m_overlayLayer)
m_overlayLayer->platformLayer()->commitOnWebKitThread(scale);
// Stash the visible content rect according to webkit thread
// This is the rectangle used to layout fixed positioned elements,
......
......@@ -78,6 +78,11 @@ void WebPageCompositorPrivate::setRootLayer(LayerCompositingThread* rootLayer)
m_rootLayer = rootLayer;
}
void WebPageCompositorPrivate::setOverlayLayer(LayerCompositingThread* overlayLayer)
{
m_overlayLayer = overlayLayer;
}
void WebPageCompositorPrivate::prepareFrame(double animationTime)
{
if (!m_layerRenderer)
......@@ -88,6 +93,8 @@ void WebPageCompositorPrivate::prepareFrame(double animationTime)
animationTime = currentTime();
if (m_rootLayer)
m_layerRenderer->prepareFrame(animationTime, m_rootLayer.get());
if (m_overlayLayer)
m_layerRenderer->prepareFrame(animationTime, m_overlayLayer.get());
}
void WebPageCompositorPrivate::render(const IntRect& targetRect, const IntRect& clipRect, const TransformationMatrix& transformIn, const FloatRect& transformedContents, const FloatRect& /*viewport*/)
......@@ -120,6 +127,8 @@ void WebPageCompositorPrivate::render(const IntRect& targetRect, const IntRect&
if (m_rootLayer)
m_layerRenderer->compositeLayers(transform, m_rootLayer.get());
if (m_overlayLayer)
m_layerRenderer->compositeLayers(transform, m_overlayLayer.get());
m_lastCompositingResults = m_layerRenderer->lastRenderingResults();
......@@ -162,6 +171,8 @@ bool WebPageCompositorPrivate::drawLayers(const IntRect& dstRect, const FloatRec
transform.translate3d(-contents.x(), -contents.y(), 0);
if (m_rootLayer)
m_layerRenderer->compositeLayers(transform, m_rootLayer.get());
if (m_overlayLayer)
m_layerRenderer->compositeLayers(transform, m_overlayLayer.get());
m_lastCompositingResults = m_layerRenderer->lastRenderingResults();
......
......@@ -67,6 +67,9 @@ public:
WebCore::LayerCompositingThread* rootLayer() const { return m_rootLayer.get(); }
void setRootLayer(WebCore::LayerCompositingThread*);
WebCore::LayerCompositingThread* overlayLayer() const { return m_overlayLayer.get(); }
void setOverlayLayer(WebCore::LayerCompositingThread*);
bool drawsRootLayer() const;
void setDrawsRootLayer(bool drawsRootLayer) { m_drawsRootLayer = drawsRootLayer; }
......@@ -100,6 +103,7 @@ private:
Platform::Graphics::GLES2Context* m_context;
OwnPtr<WebCore::LayerRenderer> m_layerRenderer;
RefPtr<WebCore::LayerCompositingThread> m_rootLayer;
RefPtr<WebCore::LayerCompositingThread> m_overlayLayer;
WebCore::IntRect m_layoutRectForCompositing;
WebCore::IntSize m_contentsSizeForCompositing;
WebCore::LayerRenderingResults m_lastCompositingResults;
......
......@@ -368,6 +368,7 @@ public:
void rootLayerCommitTimerFired(WebCore::Timer<WebPagePrivate>*);
bool commitRootLayerIfNeeded();
WebCore::LayerRenderingResults lastCompositingResults() const;
WebCore::GraphicsLayer* overlayLayer();
// WebKit thread, plumbed through from ChromeClientBlackBerry.
void setRootLayerWebKitThread(WebCore::Frame*, WebCore::LayerWebKitThread*);
......@@ -516,6 +517,7 @@ public:
#if USE(ACCELERATED_COMPOSITING)
bool m_isAcceleratedCompositingActive;
OwnPtr<FrameLayers> m_frameLayers; // WebKit thread only.
OwnPtr<WebCore::GraphicsLayer> m_overlayLayer;
// Compositing thread only, used only when the WebKit layer created the context.
// If the API client created the context, this will be null.
......
2012-05-28 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] Add an overlay layer
https://bugs.webkit.org/show_bug.cgi?id=87567
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.
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):
2012-05-28 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] Update WebPageCompositor::render() API
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment