summaryrefslogtreecommitdiffstats
path: root/Source/WebCore
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore')
-rw-r--r--Source/WebCore/platform/graphics/android/GLWebViewState.cpp8
-rw-r--r--Source/WebCore/platform/graphics/android/LayerAndroid.cpp7
-rw-r--r--Source/WebCore/platform/graphics/android/LayerAndroid.h30
-rw-r--r--Source/WebCore/platform/graphics/android/ScrollableLayerAndroid.h3
4 files changed, 36 insertions, 12 deletions
diff --git a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
index 927b0bb..c2fd9dd 100644
--- a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
+++ b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
@@ -225,8 +225,8 @@ void GLWebViewState::inval(const IntRect& rect)
else
m_frameworkInval.unite(rect);
XLOG("intermediate invalRect(%d, %d, %d, %d) after unite with rect %d %d %d %d", m_frameworkInval.x(),
- m_frameworkInval.y(), m_frameworkInval.right(), m_frameworkInval.bottom(),
- rect.x(), rect.y(), rect.right(), rect.bottom());
+ m_frameworkInval.y(), m_frameworkInval.width(), m_frameworkInval.height(),
+ rect.x(), rect.y(), rect.width(), rect.height());
}
} else {
m_invalidateRegion.op(rect.x(), rect.y(), rect.maxX(), rect.maxY(), SkRegion::kUnion_Op);
@@ -521,7 +521,7 @@ bool GLWebViewState::drawGL(IntRect& rect, SkRect& viewport, IntRect* invalRect,
}
XLOG("drawGL, rect(%d, %d, %d, %d), viewport(%.2f, %.2f, %.2f, %.2f)",
- rect.x(), rect.y(), rect.right(), rect.bottom(),
+ rect.x(), rect.y(), rect.width(), rect.height(),
viewport.fLeft, viewport.fTop, viewport.fRight, viewport.fBottom);
resetLayersDirtyArea();
@@ -553,7 +553,7 @@ bool GLWebViewState::drawGL(IntRect& rect, SkRect& viewport, IntRect* invalRect,
invalRect->setHeight(inval.height());
XLOG("invalRect(%d, %d, %d, %d)", inval.x(),
- inval.y(), inval.right(), inval.bottom());
+ inval.y(), inval.width(), inval.height());
} else {
resetFrameworkInval();
}
diff --git a/Source/WebCore/platform/graphics/android/LayerAndroid.cpp b/Source/WebCore/platform/graphics/android/LayerAndroid.cpp
index 34c02e9..67456a3 100644
--- a/Source/WebCore/platform/graphics/android/LayerAndroid.cpp
+++ b/Source/WebCore/platform/graphics/android/LayerAndroid.cpp
@@ -510,6 +510,9 @@ const LayerAndroid* LayerAndroid::find(int* xPtr, int* yPtr, SkPicture* root) co
void LayerAndroid::updateFixedLayersPositions(SkRect viewport, LayerAndroid* parentIframeLayer)
{
+ XLOG("updating fixed positions, using viewport %fx%f - %fx%f",
+ viewport.fLeft, viewport.fTop,
+ viewport.width(), viewport.height());
// If this is an iframe, accumulate the offset from the parent with
// current position, and change the parent pointer.
if (m_isIframe) {
@@ -952,9 +955,9 @@ bool LayerAndroid::drawGL(GLWebViewState* glWebViewState, SkMatrix& matrix)
if (textureInfo && (!m_contentsImage || (ready && m_contentsImage))) {
SkRect bounds;
bounds.set(m_drawingTexture->rect());
- XLOG("LayerAndroid %d %x (%.2f, %.2f) drawGL (texture %x, %d, %d, %d, %d)",
+ XLOG("LayerAndroid %d %x (%.2f, %.2f) drawGL (texture %x, %f, %f, %f, %f)",
uniqueId(), this, getWidth(), getHeight(),
- m_drawingTexture, bounds.x(), bounds.y(),
+ m_drawingTexture, bounds.fLeft, bounds.fTop,
bounds.width(), bounds.height());
//TODO determine when drawing if the alpha value is used.
TilesManager::instance()->shader()->drawLayerQuad(drawTransform(), bounds,
diff --git a/Source/WebCore/platform/graphics/android/LayerAndroid.h b/Source/WebCore/platform/graphics/android/LayerAndroid.h
index d4510c5..fe41e35 100644
--- a/Source/WebCore/platform/graphics/android/LayerAndroid.h
+++ b/Source/WebCore/platform/graphics/android/LayerAndroid.h
@@ -47,6 +47,8 @@ class SkPicture;
namespace android {
class DrawExtra;
+void serializeLayer(LayerAndroid* layer, SkWStream* stream);
+LayerAndroid* deserializeLayer(SkStream* stream);
}
using namespace android;
@@ -256,6 +258,9 @@ public:
void setIsIframe(bool isIframe) { m_isIframe = isIframe; }
float zValue() const { return m_zValue; }
+ friend void android::serializeLayer(LayerAndroid* layer, SkWStream* stream);
+ friend LayerAndroid* android::deserializeLayer(SkStream* stream);
+
protected:
virtual void onDraw(SkCanvas*, SkScalar opacity);
@@ -269,6 +274,10 @@ private:
bool prepareContext(bool force = false);
void clipInner(SkTDArray<SkRect>* region, const SkRect& local) const;
+ // -------------------------------------------------------------------
+ // Fields to be serialized
+ // -------------------------------------------------------------------
+
bool m_haveClip;
bool m_isFixed;
bool m_backgroundColorSet;
@@ -284,13 +293,10 @@ private:
SkLength m_fixedMarginBottom;
SkRect m_fixedRect;
- SkPoint m_iframeOffset;
// When fixed element is undefined or auto, the render layer's position
// is needed for offset computation
IntPoint m_renderLayerPos;
- TransformationMatrix m_transform;
- float m_zValue;
bool m_backfaceVisibility;
bool m_visible;
@@ -299,9 +305,6 @@ private:
bool m_preserves3D;
float m_anchorPointZ;
float m_drawOpacity;
- TransformationMatrix m_drawTransform;
- TransformationMatrix m_childrenTransform;
- FloatRect m_clippingRect;
// Note that m_recordingPicture and m_contentsImage are mutually exclusive;
// m_recordingPicture is used when WebKit is asked to paint the layer's
@@ -315,6 +318,21 @@ private:
typedef HashMap<pair<String, int>, RefPtr<AndroidAnimation> > KeyframesMap;
KeyframesMap m_animations;
+
+ TransformationMatrix m_transform;
+ TransformationMatrix m_childrenTransform;
+
+ // -------------------------------------------------------------------
+ // Fields that are not serialized (generated, cached, or non-serializable)
+ // -------------------------------------------------------------------
+
+ SkPoint m_iframeOffset;
+
+ float m_zValue;
+
+ TransformationMatrix m_drawTransform;
+ FloatRect m_clippingRect;
+
SkPicture* m_extra;
int m_uniqueId;
diff --git a/Source/WebCore/platform/graphics/android/ScrollableLayerAndroid.h b/Source/WebCore/platform/graphics/android/ScrollableLayerAndroid.h
index b23f056..c3fdecd 100644
--- a/Source/WebCore/platform/graphics/android/ScrollableLayerAndroid.h
+++ b/Source/WebCore/platform/graphics/android/ScrollableLayerAndroid.h
@@ -57,6 +57,9 @@ public:
m_scrollLimits.set(x, y, x + width, y + height);
}
+ friend void android::serializeLayer(LayerAndroid* layer, SkWStream* stream);
+ friend LayerAndroid* android::deserializeLayer(SkStream* stream);
+
private:
SkRect m_scrollLimits;
};