Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: cc/picture_layer.cc

Issue 11882037: Activate LayerImpl tree with sync+push instead of pointer swap (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/nine_patch_layer_impl.cc ('k') | cc/picture_layer_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/picture_layer.h" 5 #include "cc/picture_layer.h"
6 6
7 #include "cc/layer_tree_impl.h" 7 #include "cc/layer_tree_impl.h"
8 #include "cc/picture_layer_impl.h" 8 #include "cc/picture_layer_impl.h"
9 #include "ui/gfx/rect_conversions.h" 9 #include "ui/gfx/rect_conversions.h"
10 10
(...skipping 18 matching lines...) Expand all
29 29
30 scoped_ptr<LayerImpl> PictureLayer::createLayerImpl(LayerTreeImpl* treeImpl) { 30 scoped_ptr<LayerImpl> PictureLayer::createLayerImpl(LayerTreeImpl* treeImpl) {
31 return PictureLayerImpl::create(treeImpl, id()).PassAs<LayerImpl>(); 31 return PictureLayerImpl::create(treeImpl, id()).PassAs<LayerImpl>();
32 } 32 }
33 33
34 void PictureLayer::pushPropertiesTo(LayerImpl* base_layer) { 34 void PictureLayer::pushPropertiesTo(LayerImpl* base_layer) {
35 Layer::pushPropertiesTo(base_layer); 35 Layer::pushPropertiesTo(base_layer);
36 36
37 PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer); 37 PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer);
38 layer_impl->SetIsMask(is_mask_); 38 layer_impl->SetIsMask(is_mask_);
39 layer_impl->tilings_.SetLayerBounds(bounds()); 39 layer_impl->CreateTilingSet();
40 layer_impl->invalidation_.Clear(); 40 layer_impl->invalidation_.Clear();
41 layer_impl->invalidation_.Swap(pile_invalidation_); 41 layer_impl->invalidation_.Swap(pile_invalidation_);
42 pile_->PushPropertiesTo(layer_impl->pile_); 42 pile_->PushPropertiesTo(layer_impl->pile_);
43 43
44 layer_impl->SyncFromActiveLayer(); 44 layer_impl->SyncFromActiveLayer();
45 } 45 }
46 46
47 void PictureLayer::setLayerTreeHost(LayerTreeHost* host) { 47 void PictureLayer::setLayerTreeHost(LayerTreeHost* host) {
48 Layer::setLayerTreeHost(host); 48 Layer::setLayerTreeHost(host);
49 if (host) 49 if (host)
(...skipping 23 matching lines...) Expand all
73 pending_invalidation_.Clear(); 73 pending_invalidation_.Clear();
74 74
75 pile_->Update(client_, pile_invalidation_, stats); 75 pile_->Update(client_, pile_invalidation_, stats);
76 } 76 }
77 77
78 void PictureLayer::setIsMask(bool is_mask) { 78 void PictureLayer::setIsMask(bool is_mask) {
79 is_mask_ = is_mask; 79 is_mask_ = is_mask;
80 } 80 }
81 81
82 } // namespace cc 82 } // namespace cc
OLDNEW
« no previous file with comments | « cc/nine_patch_layer_impl.cc ('k') | cc/picture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698