summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/graphics')
-rw-r--r--WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp6
-rw-r--r--WebCore/platform/graphics/android/LayerAndroid.cpp11
-rw-r--r--WebCore/platform/graphics/android/LayerAndroid.h7
-rw-r--r--WebCore/platform/graphics/android/ScrollableLayerAndroid.h4
4 files changed, 18 insertions, 10 deletions
diff --git a/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp b/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
index ccc872a..f2163cc 100644
--- a/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
+++ b/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
@@ -122,8 +122,8 @@ GraphicsLayerAndroid::GraphicsLayerAndroid(GraphicsLayerClient* client) :
m_foregroundLayer(0),
m_foregroundClipLayer(0)
{
- m_contentLayer = new LayerAndroid(true);
RenderLayer* renderLayer = renderLayerFromClient(m_client);
+ m_contentLayer = new LayerAndroid(renderLayer, true);
if (renderLayer) {
m_contentLayer->setIsRootLayer(renderLayer->isRootLayer()
&& !(renderLayer->renderer()->frame()->ownerElement()));
@@ -487,8 +487,8 @@ void GraphicsLayerAndroid::updateScrollingLayers()
ASSERT(!hasOverflowScroll);
if (layerNeedsOverflow) {
ASSERT(!m_foregroundLayer && !m_foregroundClipLayer);
- m_foregroundLayer = new ScrollableLayerAndroid();
- m_foregroundClipLayer = new LayerAndroid(false);
+ m_foregroundLayer = new ScrollableLayerAndroid(layer);
+ m_foregroundClipLayer = new LayerAndroid(layer, false);
m_foregroundClipLayer->setMasksToBounds(true);
m_foregroundClipLayer->addChild(m_foregroundLayer);
m_contentLayer->addChild(m_foregroundClipLayer);
diff --git a/WebCore/platform/graphics/android/LayerAndroid.cpp b/WebCore/platform/graphics/android/LayerAndroid.cpp
index 35979f6..66a62e1 100644
--- a/WebCore/platform/graphics/android/LayerAndroid.cpp
+++ b/WebCore/platform/graphics/android/LayerAndroid.cpp
@@ -61,7 +61,7 @@ class OpacityDrawFilter : public SkDrawFilter {
///////////////////////////////////////////////////////////////////////////////
-LayerAndroid::LayerAndroid(bool isRootLayer) : SkLayer(),
+LayerAndroid::LayerAndroid(RenderLayer* owner, bool isRootLayer) : SkLayer(),
m_isRootLayer(isRootLayer),
m_haveClip(false),
m_isFixed(false),
@@ -76,7 +76,8 @@ LayerAndroid::LayerAndroid(bool isRootLayer) : SkLayer(),
m_pictureUsed(0),
m_requestSent(false),
m_scale(1),
- m_lastComputeTextureSize(0)
+ m_lastComputeTextureSize(0),
+ m_owningLayer(owner)
{
m_backgroundColor = 0;
@@ -95,7 +96,8 @@ LayerAndroid::LayerAndroid(const LayerAndroid& layer) : SkLayer(layer),
m_uniqueId(layer.m_uniqueId),
m_drawingTexture(0),
m_reservedTexture(0),
- m_requestSent(false)
+ m_requestSent(false),
+ m_owningLayer(layer.m_owningLayer)
{
m_isFixed = layer.m_isFixed;
m_contentsImage = layer.m_contentsImage;
@@ -150,7 +152,8 @@ LayerAndroid::LayerAndroid(SkPicture* picture) : SkLayer(),
m_reservedTexture(0),
m_requestSent(false),
m_scale(1),
- m_lastComputeTextureSize(0)
+ m_lastComputeTextureSize(0),
+ m_owningLayer(0)
{
m_backgroundColor = 0;
m_dirty = false;
diff --git a/WebCore/platform/graphics/android/LayerAndroid.h b/WebCore/platform/graphics/android/LayerAndroid.h
index 0d5a878..7d4eac9 100644
--- a/WebCore/platform/graphics/android/LayerAndroid.h
+++ b/WebCore/platform/graphics/android/LayerAndroid.h
@@ -83,12 +83,13 @@ namespace WebCore {
class AndroidAnimation;
class BackedDoubleBufferedTexture;
class LayerAndroidFindState;
+class RenderLayer;
class TiledPage;
class LayerAndroid : public SkLayer, public TextureOwner {
public:
- LayerAndroid(bool isRootLayer);
+ LayerAndroid(RenderLayer* owner, bool isRootLayer);
LayerAndroid(const LayerAndroid& layer);
LayerAndroid(SkPicture*);
virtual ~LayerAndroid();
@@ -245,6 +246,8 @@ public:
virtual bool isMedia() const { return false; }
+ RenderLayer* owningLayer() const { return m_owningLayer; }
+
protected:
virtual void onDraw(SkCanvas*, SkScalar opacity);
@@ -334,6 +337,8 @@ private:
// across all threads and cores.
android::Mutex m_atomicSync;
+ RenderLayer* m_owningLayer;
+
typedef SkLayer INHERITED;
};
diff --git a/WebCore/platform/graphics/android/ScrollableLayerAndroid.h b/WebCore/platform/graphics/android/ScrollableLayerAndroid.h
index 697fe74..68fba77 100644
--- a/WebCore/platform/graphics/android/ScrollableLayerAndroid.h
+++ b/WebCore/platform/graphics/android/ScrollableLayerAndroid.h
@@ -26,8 +26,8 @@ namespace WebCore {
class ScrollableLayerAndroid : public LayerAndroid {
public:
- ScrollableLayerAndroid()
- : LayerAndroid(false) {}
+ ScrollableLayerAndroid(RenderLayer* owner)
+ : LayerAndroid(owner, false) {}
ScrollableLayerAndroid(const ScrollableLayerAndroid& layer)
: LayerAndroid(layer)
, m_scrollLimits(layer.m_scrollLimits) {}