summaryrefslogtreecommitdiffstats
path: root/cc/picture_layer_impl.cc
diff options
context:
space:
mode:
authorreveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-29 12:58:18 +0000
committerreveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-29 12:58:18 +0000
commit91e89bc85631eb357ead53afc8a5642fe7067b60 (patch)
tree97d0dc2f0c49043c22002f0a36fa08e9cfba65e2 /cc/picture_layer_impl.cc
parenta09159a8a3658a616ebc7e32703c25366ac65a0f (diff)
downloadchromium_src-91e89bc85631eb357ead53afc8a5642fe7067b60.zip
chromium_src-91e89bc85631eb357ead53afc8a5642fe7067b60.tar.gz
chromium_src-91e89bc85631eb357ead53afc8a5642fe7067b60.tar.bz2
cc: Add ref counted PicturePileImpl class and give each Tile instance a ref.
This is required as tiles are reference counted and there's no guarantee that they have been destroyed by the time the layer owning the picture pile is destroyed. BUG=skia:988 TEST=manual Review URL: https://chromiumcodereview.appspot.com/11434016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170170 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/picture_layer_impl.cc')
-rw-r--r--cc/picture_layer_impl.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/cc/picture_layer_impl.cc b/cc/picture_layer_impl.cc
index 1809596..48cd82d 100644
--- a/cc/picture_layer_impl.cc
+++ b/cc/picture_layer_impl.cc
@@ -13,7 +13,8 @@ namespace cc {
PictureLayerImpl::PictureLayerImpl(int id) :
LayerImpl(id),
- tilings_(this) {
+ tilings_(this),
+ pile_(PicturePileImpl::Create()) {
}
PictureLayerImpl::~PictureLayerImpl() {
@@ -96,7 +97,7 @@ scoped_refptr<Tile> PictureLayerImpl::CreateTile(PictureLayerTiling*,
return make_scoped_refptr(new Tile(
tile_manager,
- &pile_,
+ pile_.get(),
rect.size(),
GL_RGBA,
rect));