summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2011-10-14 15:06:28 -0700
committerChris Craik <ccraik@google.com>2011-10-14 15:22:26 -0700
commit21e578ad4c9bee5b63696a3af8bb3c3c8d4e817b (patch)
tree96b8bf1e94d85a241a7372f1e8ddc2d3de3d34c9 /Source/WebCore/platform
parent530c83c6351e05a6939ad0b5bc291da073e77b5b (diff)
downloadexternal_webkit-21e578ad4c9bee5b63696a3af8bb3c3c8d4e817b.zip
external_webkit-21e578ad4c9bee5b63696a3af8bb3c3c8d4e817b.tar.gz
external_webkit-21e578ad4c9bee5b63696a3af8bb3c3c8d4e817b.tar.bz2
Fix layer initialization
bug:5452786 Fixed layer initialization to reference its current layer's SkPicture when it's created Change-Id: I4ac33ad6874a982d375859445e2a014ff35d7e12
Diffstat (limited to 'Source/WebCore/platform')
-rw-r--r--Source/WebCore/platform/graphics/android/PaintedSurface.cpp16
-rw-r--r--Source/WebCore/platform/graphics/android/PaintedSurface.h14
2 files changed, 17 insertions, 13 deletions
diff --git a/Source/WebCore/platform/graphics/android/PaintedSurface.cpp b/Source/WebCore/platform/graphics/android/PaintedSurface.cpp
index 1eb51c7..d48c116 100644
--- a/Source/WebCore/platform/graphics/android/PaintedSurface.cpp
+++ b/Source/WebCore/platform/graphics/android/PaintedSurface.cpp
@@ -53,6 +53,22 @@
namespace WebCore {
+PaintedSurface::PaintedSurface(LayerAndroid* layer)
+ : m_layer(layer)
+ , m_tiledTexture(0)
+ , m_scale(0)
+ , m_pictureUsed(0)
+{
+ TilesManager::instance()->addPaintedSurface(this);
+ SkSafeRef(m_layer);
+#ifdef DEBUG_COUNT
+ ClassTracker::instance()->increment("PaintedSurface");
+#endif
+ m_tiledTexture = new TiledTexture(this);
+ if (layer && layer->picture())
+ m_updateManager.updatePicture(layer->picture());
+}
+
PaintedSurface::~PaintedSurface()
{
XLOG("dtor of %x m_layer: %x", this, m_layer);
diff --git a/Source/WebCore/platform/graphics/android/PaintedSurface.h b/Source/WebCore/platform/graphics/android/PaintedSurface.h
index cda5960..5df76db 100644
--- a/Source/WebCore/platform/graphics/android/PaintedSurface.h
+++ b/Source/WebCore/platform/graphics/android/PaintedSurface.h
@@ -47,19 +47,7 @@ class UpdateManager;
class PaintedSurface : public SkRefCnt {
public:
- PaintedSurface(LayerAndroid* layer)
- : m_layer(layer)
- , m_tiledTexture(0)
- , m_scale(0)
- , m_pictureUsed(0)
- {
- TilesManager::instance()->addPaintedSurface(this);
- SkSafeRef(m_layer);
-#ifdef DEBUG_COUNT
- ClassTracker::instance()->increment("PaintedSurface");
-#endif
- m_tiledTexture = new TiledTexture(this);
- }
+ PaintedSurface(LayerAndroid* layer);
virtual ~PaintedSurface();
// PaintedSurface methods