From 586d51edafeeed9705656ac871fcd3d7653e4456 Mon Sep 17 00:00:00 2001 From: "enne@chromium.org" Date: Fri, 7 Dec 2012 20:31:45 +0000 Subject: cc: Pass LayerTreeHostImpl to LayerImpl constructor In order to allow for LayerImpl to notify its host when one of its property changes, it needs to more robustly have its host set (which is not the case in most tests). To avoid a recursive pass when adding children or after layer synchronization, instead just pass it to the constructor of LayerImpl, since a given LayerImpl will never move from one host to another. NOTRY=true BUG=none Review URL: https://chromiumcodereview.appspot.com/11472021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171830 0039d316-1c4b-4281-b951-d872f2087c98 --- cc/io_surface_layer_impl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cc/io_surface_layer_impl.h') diff --git a/cc/io_surface_layer_impl.h b/cc/io_surface_layer_impl.h index 451373b..f7d4a58 100644 --- a/cc/io_surface_layer_impl.h +++ b/cc/io_surface_layer_impl.h @@ -13,9 +13,9 @@ namespace cc { class CC_EXPORT IOSurfaceLayerImpl : public LayerImpl { public: - static scoped_ptr create(int id) + static scoped_ptr create(LayerTreeHostImpl* hostImpl, int id) { - return make_scoped_ptr(new IOSurfaceLayerImpl(id)); + return make_scoped_ptr(new IOSurfaceLayerImpl(hostImpl, id)); } virtual ~IOSurfaceLayerImpl(); @@ -29,7 +29,7 @@ public: virtual void dumpLayerProperties(std::string*, int indent) const OVERRIDE; private: - explicit IOSurfaceLayerImpl(int); + IOSurfaceLayerImpl(LayerTreeHostImpl* hostImpl, int id); virtual const char* layerTypeAsString() const OVERRIDE; -- cgit v1.1