summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/android/LayerAndroid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/graphics/android/LayerAndroid.cpp')
-rw-r--r--WebCore/platform/graphics/android/LayerAndroid.cpp46
1 files changed, 3 insertions, 43 deletions
diff --git a/WebCore/platform/graphics/android/LayerAndroid.cpp b/WebCore/platform/graphics/android/LayerAndroid.cpp
index 26372f0..c17a034 100644
--- a/WebCore/platform/graphics/android/LayerAndroid.cpp
+++ b/WebCore/platform/graphics/android/LayerAndroid.cpp
@@ -49,14 +49,10 @@ LayerAndroid::LayerAndroid(bool isRootLayer) : SkLayer(),
m_haveClip(false),
m_doRotation(false),
m_isFixed(false),
- m_isRelativeTo(false),
- m_relativeFixedLayerID(0),
m_recordingPicture(0),
m_extra(0),
- m_uniqueId(++gUniqueId),
- m_relativeFixedLayer(0)
+ m_uniqueId(++gUniqueId)
{
- m_deltaPosition.set(0, 0);
m_angleTransform = 0;
m_translation.set(0, 0);
m_scale.set(1, 1);
@@ -69,14 +65,10 @@ LayerAndroid::LayerAndroid(const LayerAndroid& layer) : SkLayer(layer),
m_isRootLayer(layer.m_isRootLayer),
m_haveClip(layer.m_haveClip),
m_extra(0), // deliberately not copied
- m_uniqueId(layer.m_uniqueId),
- m_relativeFixedLayer(0)
+ m_uniqueId(layer.m_uniqueId)
{
m_doRotation = layer.m_doRotation;
m_isFixed = layer.m_isFixed;
- m_isRelativeTo = layer.m_isRelativeTo;
- m_relativeFixedLayerID = layer.m_relativeFixedLayerID;
- m_deltaPosition = layer.m_deltaPosition;
m_angleTransform = layer.m_angleTransform;
m_translation = layer.m_translation;
@@ -108,14 +100,10 @@ LayerAndroid::LayerAndroid(SkPicture* picture) : SkLayer(),
m_haveClip(false),
m_doRotation(false),
m_isFixed(false),
- m_isRelativeTo(false),
- m_relativeFixedLayerID(0),
m_recordingPicture(picture),
m_extra(0),
- m_uniqueId(-1),
- m_relativeFixedLayer(0)
+ m_uniqueId(-1)
{
- m_deltaPosition.set(0, 0);
m_angleTransform = 0;
m_translation.set(0, 0);
m_scale.set(1, 1);
@@ -257,27 +245,6 @@ const LayerAndroid* LayerAndroid::find(int x, int y) const
///////////////////////////////////////////////////////////////////////////////
-void LayerAndroid::setRelativeTo(LayerAndroid* container) {
- ASSERT(container->m_isFixed);
- m_relativeFixedLayerID = container->m_uniqueId;
- m_isRelativeTo = true;
- m_deltaPosition = getPosition() - container->getPosition();
-}
-
-void LayerAndroid::ensureFixedLayersForDescendants(const LayerAndroid* rootLayer) {
- if (m_isRelativeTo && !m_relativeFixedLayer) {
- LayerAndroid* containerLayer = const_cast<LayerAndroid*>(
- rootLayer->findById(m_relativeFixedLayerID));
- if (containerLayer)
- m_relativeFixedLayer = containerLayer;
- }
-
- int count = countChildren();
- for (int i = 0; i < count; i++) {
- getChild(i)->ensureFixedLayersForDescendants(rootLayer);
- }
-}
-
void LayerAndroid::updateFixedLayersPositions(const SkRect& viewport) {
if (m_isFixed) {
@@ -311,13 +278,6 @@ void LayerAndroid::updatePositions() {
// apply the viewport to us
SkMatrix matrix;
if (!m_isFixed) {
- // If we are defined as being relative to a fixed
- // layer, we need to update our position...
- if (m_isRelativeTo && m_relativeFixedLayer) {
- this->setPosition(m_relativeFixedLayer->getPosition().fX + m_deltaPosition.fX,
- m_relativeFixedLayer->getPosition().fY + m_deltaPosition.fY);
- }
-
// turn our fields into a matrix.
//
// TODO: this should happen in the caller, and we should remove these