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

Side by Side Diff: cc/layers/picture_layer_impl_unittest.cc

Issue 1417903005: Revert of Remove DCHECK_IMPLIES/CHECK_IMPLIES. (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 unified diff | Download patch
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/layers/video_layer_impl.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 host_impl_.CreatePendingTree(); 225 host_impl_.CreatePendingTree();
226 host_impl_.pending_tree()->PushPageScaleFromMainThread(1.f, 0.00001f, 226 host_impl_.pending_tree()->PushPageScaleFromMainThread(1.f, 0.00001f,
227 100000.f); 227 100000.f);
228 LayerTreeImpl* pending_tree = host_impl_.pending_tree(); 228 LayerTreeImpl* pending_tree = host_impl_.pending_tree();
229 pending_tree->SetDeviceScaleFactor( 229 pending_tree->SetDeviceScaleFactor(
230 host_impl_.active_tree()->device_scale_factor()); 230 host_impl_.active_tree()->device_scale_factor());
231 231
232 // Steal from the recycled tree if possible. 232 // Steal from the recycled tree if possible.
233 scoped_ptr<LayerImpl> pending_root = pending_tree->DetachLayerTree(); 233 scoped_ptr<LayerImpl> pending_root = pending_tree->DetachLayerTree();
234 scoped_ptr<FakePictureLayerImpl> pending_layer; 234 scoped_ptr<FakePictureLayerImpl> pending_layer;
235 DCHECK(!pending_root || pending_root->id() == root_id_); 235 DCHECK_IMPLIES(pending_root, pending_root->id() == root_id_);
236 if (!pending_root) { 236 if (!pending_root) {
237 pending_root = LayerImpl::Create(pending_tree, root_id_); 237 pending_root = LayerImpl::Create(pending_tree, root_id_);
238 pending_layer = FakePictureLayerImpl::Create(pending_tree, id_); 238 pending_layer = FakePictureLayerImpl::Create(pending_tree, id_);
239 if (!tile_size.IsEmpty()) 239 if (!tile_size.IsEmpty())
240 pending_layer->set_fixed_tile_size(tile_size); 240 pending_layer->set_fixed_tile_size(tile_size);
241 pending_layer->SetDrawsContent(true); 241 pending_layer->SetDrawsContent(true);
242 } else { 242 } else {
243 pending_layer.reset(static_cast<FakePictureLayerImpl*>( 243 pending_layer.reset(static_cast<FakePictureLayerImpl*>(
244 pending_root->RemoveChild(pending_root->children()[0]).release())); 244 pending_root->RemoveChild(pending_root->children()[0]).release()));
245 if (!tile_size.IsEmpty()) 245 if (!tile_size.IsEmpty())
(...skipping 4780 matching lines...) Expand 10 before | Expand all | Expand 10 after
5026 // New low res tiling. 5026 // New low res tiling.
5027 EXPECT_TRUE(tilings->tiling_at(2)->may_contain_low_resolution_tiles()); 5027 EXPECT_TRUE(tilings->tiling_at(2)->may_contain_low_resolution_tiles());
5028 5028
5029 // This tiling will be high res now, it won't contain low res content since it 5029 // This tiling will be high res now, it won't contain low res content since it
5030 // was all destroyed. 5030 // was all destroyed.
5031 EXPECT_FALSE(tilings->tiling_at(1)->may_contain_low_resolution_tiles()); 5031 EXPECT_FALSE(tilings->tiling_at(1)->may_contain_low_resolution_tiles());
5032 } 5032 }
5033 5033
5034 } // namespace 5034 } // namespace
5035 } // namespace cc 5035 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/layers/video_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698