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

Side by Side Diff: cc/tiles/tile_manager_unittest.cc

Issue 1421483005: Reland: 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/tiles/tile_manager.cc ('k') | cc/trees/layer_tree_host.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 "base/run_loop.h" 5 #include "base/run_loop.h"
6 #include "base/thread_task_runner_handle.h" 6 #include "base/thread_task_runner_handle.h"
7 #include "cc/playback/display_list_raster_source.h" 7 #include "cc/playback/display_list_raster_source.h"
8 #include "cc/playback/display_list_recording_source.h" 8 #include "cc/playback/display_list_recording_source.h"
9 #include "cc/raster/raster_buffer.h" 9 #include "cc/raster/raster_buffer.h"
10 #include "cc/resources/resource_pool.h" 10 #include "cc/resources/resource_pool.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 ActivateTree(); 118 ActivateTree();
119 SetupPendingTree(pending_raster_source); 119 SetupPendingTree(pending_raster_source);
120 } 120 }
121 121
122 void SetupPendingTree(scoped_refptr<DisplayListRasterSource> raster_source) { 122 void SetupPendingTree(scoped_refptr<DisplayListRasterSource> raster_source) {
123 host_impl_.CreatePendingTree(); 123 host_impl_.CreatePendingTree();
124 LayerTreeImpl* pending_tree = host_impl_.pending_tree(); 124 LayerTreeImpl* pending_tree = host_impl_.pending_tree();
125 125
126 // Steal from the recycled tree. 126 // Steal from the recycled tree.
127 scoped_ptr<LayerImpl> old_pending_root = pending_tree->DetachLayerTree(); 127 scoped_ptr<LayerImpl> old_pending_root = pending_tree->DetachLayerTree();
128 DCHECK_IMPLIES(old_pending_root, old_pending_root->id() == id_); 128 DCHECK(!old_pending_root || old_pending_root->id() == id_);
129 129
130 scoped_ptr<FakePictureLayerImpl> pending_layer; 130 scoped_ptr<FakePictureLayerImpl> pending_layer;
131 if (old_pending_root) { 131 if (old_pending_root) {
132 pending_layer.reset( 132 pending_layer.reset(
133 static_cast<FakePictureLayerImpl*>(old_pending_root.release())); 133 static_cast<FakePictureLayerImpl*>(old_pending_root.release()));
134 pending_layer->SetRasterSourceOnPending(raster_source, Region()); 134 pending_layer->SetRasterSourceOnPending(raster_source, Region());
135 } else { 135 } else {
136 pending_layer = FakePictureLayerImpl::CreateWithRasterSource( 136 pending_layer = FakePictureLayerImpl::CreateWithRasterSource(
137 pending_tree, id_, raster_source); 137 pending_tree, id_, raster_source);
138 pending_layer->SetDrawsContent(true); 138 pending_layer->SetDrawsContent(true);
(...skipping 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after
1801 } 1801 }
1802 1802
1803 // Ensures that the tile manager does not attempt to reuse tiles when partial 1803 // Ensures that the tile manager does not attempt to reuse tiles when partial
1804 // raster is disabled. 1804 // raster is disabled.
1805 TEST_F(TileManagerTest, PartialRasterSuccessfullyDisabled) { 1805 TEST_F(TileManagerTest, PartialRasterSuccessfullyDisabled) {
1806 RunPartialRasterCheck(host_impl_.Pass(), false /* partial_raster_enabled */); 1806 RunPartialRasterCheck(host_impl_.Pass(), false /* partial_raster_enabled */);
1807 } 1807 }
1808 1808
1809 } // namespace 1809 } // namespace
1810 } // namespace cc 1810 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/tile_manager.cc ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698