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

Unified Diff: cc/trees/layer_tree_host_unittest_picture.cc

Issue 1437413002: cc: Remove ScopedPtrVector and cc::remove_if. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_unittest_occlusion.cc ('k') | cc/trees/layer_tree_host_unittest_scroll.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest_picture.cc
diff --git a/cc/trees/layer_tree_host_unittest_picture.cc b/cc/trees/layer_tree_host_unittest_picture.cc
index 9c5d00eddb145249b7099a090634019f6afafaf9..ec42144df83176bd59c98fe01981235e5b309c58 100644
--- a/cc/trees/layer_tree_host_unittest_picture.cc
+++ b/cc/trees/layer_tree_host_unittest_picture.cc
@@ -81,7 +81,8 @@ class LayerTreeHostPictureTestTwinLayer
}
FakePictureLayerImpl* pending_picture_impl =
- static_cast<FakePictureLayerImpl*>(pending_root_impl->children()[0]);
+ static_cast<FakePictureLayerImpl*>(
+ pending_root_impl->children()[0].get());
if (!active_root_impl) {
EXPECT_EQ(0, activates_);
@@ -96,7 +97,8 @@ class LayerTreeHostPictureTestTwinLayer
}
FakePictureLayerImpl* active_picture_impl =
- static_cast<FakePictureLayerImpl*>(active_root_impl->children()[0]);
+ static_cast<FakePictureLayerImpl*>(
+ active_root_impl->children()[0].get());
// After the first activation, when we commit again, we'll have a pending
// and active layer. Then we recreate a picture layer in the 4th activate
@@ -115,7 +117,8 @@ class LayerTreeHostPictureTestTwinLayer
EXPECT_EQ(2, activates_);
} else {
FakePictureLayerImpl* active_picture_impl =
- static_cast<FakePictureLayerImpl*>(active_root_impl->children()[0]);
+ static_cast<FakePictureLayerImpl*>(
+ active_root_impl->children()[0].get());
EXPECT_EQ(nullptr, active_picture_impl->GetPendingOrActiveTwinLayer());
}
@@ -152,7 +155,7 @@ class LayerTreeHostPictureTestResizeViewportWithGpuRaster
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
- LayerImpl* child = impl->sync_tree()->root_layer()->children()[0];
+ LayerImpl* child = impl->sync_tree()->root_layer()->children()[0].get();
FakePictureLayerImpl* picture_impl =
static_cast<FakePictureLayerImpl*>(child);
gfx::Size tile_size =
@@ -221,7 +224,7 @@ class LayerTreeHostPictureTestChangeLiveTilesRectWithRecycleTree
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
- LayerImpl* child = impl->active_tree()->root_layer()->children()[0];
+ LayerImpl* child = impl->active_tree()->root_layer()->children()[0].get();
FakePictureLayerImpl* picture_impl =
static_cast<FakePictureLayerImpl*>(child);
switch (++frame_) {
@@ -272,7 +275,7 @@ class LayerTreeHostPictureTestChangeLiveTilesRectWithRecycleTree
}
void WillActivateTreeOnThread(LayerTreeHostImpl* impl) override {
- LayerImpl* child = impl->sync_tree()->root_layer()->children()[0];
+ LayerImpl* child = impl->sync_tree()->root_layer()->children()[0].get();
FakePictureLayerImpl* picture_impl =
static_cast<FakePictureLayerImpl*>(child);
PictureLayerTiling* tiling = picture_impl->HighResTiling();
@@ -326,8 +329,8 @@ class LayerTreeHostPictureTestRSLLMembership : public LayerTreeHostPictureTest {
void CommitCompleteOnThread(LayerTreeHostImpl* impl) override {
LayerImpl* root = impl->sync_tree()->root_layer();
- LayerImpl* child = root->children()[0];
- LayerImpl* gchild = child->children()[0];
+ LayerImpl* child = root->children()[0].get();
+ LayerImpl* gchild = child->children()[0].get();
FakePictureLayerImpl* picture = static_cast<FakePictureLayerImpl*>(gchild);
switch (impl->sync_tree()->source_frame_number()) {
@@ -348,8 +351,8 @@ class LayerTreeHostPictureTestRSLLMembership : public LayerTreeHostPictureTest {
void DidActivateTreeOnThread(LayerTreeHostImpl* impl) override {
LayerImpl* root = impl->active_tree()->root_layer();
- LayerImpl* child = root->children()[0];
- LayerImpl* gchild = child->children()[0];
+ LayerImpl* child = root->children()[0].get();
+ LayerImpl* gchild = child->children()[0].get();
FakePictureLayerImpl* picture = static_cast<FakePictureLayerImpl*>(gchild);
switch (impl->active_tree()->source_frame_number()) {
@@ -430,8 +433,8 @@ class LayerTreeHostPictureTestRSLLMembershipWithScale
void WillActivateTreeOnThread(LayerTreeHostImpl* impl) override {
LayerImpl* root = impl->sync_tree()->root_layer();
- LayerImpl* pinch = root->children()[0];
- LayerImpl* gchild = pinch->children()[0];
+ LayerImpl* pinch = root->children()[0].get();
+ LayerImpl* gchild = pinch->children()[0].get();
FakePictureLayerImpl* picture = static_cast<FakePictureLayerImpl*>(gchild);
ready_to_draw_ = false;
@@ -457,8 +460,8 @@ class LayerTreeHostPictureTestRSLLMembershipWithScale
void DrawLayersOnThread(LayerTreeHostImpl* impl) override {
LayerImpl* root = impl->active_tree()->root_layer();
- LayerImpl* pinch = root->children()[0];
- LayerImpl* gchild = pinch->children()[0];
+ LayerImpl* pinch = root->children()[0].get();
+ LayerImpl* gchild = pinch->children()[0].get();
FakePictureLayerImpl* picture = static_cast<FakePictureLayerImpl*>(gchild);
if (frame_ != last_frame_drawn_)
« no previous file with comments | « cc/trees/layer_tree_host_unittest_occlusion.cc ('k') | cc/trees/layer_tree_host_unittest_scroll.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698