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

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

Issue 306683002: MockQC stops create its own RP and MockOcclusionTracker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@testocclusiontracking
Patch Set: rebase Created 6 years, 6 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
« no previous file with comments | « cc/layers/nine_patch_layer_impl_unittest.cc ('k') | cc/layers/picture_layer_impl_unittest.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_image_layer_impl.h" 5 #include "cc/layers/picture_image_layer_impl.h"
6 6
7 #include "cc/layers/append_quads_data.h" 7 #include "cc/layers/append_quads_data.h"
8 #include "cc/resources/tile_priority.h" 8 #include "cc/resources/tile_priority.h"
9 #include "cc/test/fake_impl_proxy.h" 9 #include "cc/test/fake_impl_proxy.h"
10 #include "cc/test/fake_layer_tree_host_impl.h" 10 #include "cc/test/fake_layer_tree_host_impl.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 animating_transform_to_screen); 148 animating_transform_to_screen);
149 149
150 // Create tile and resource. 150 // Create tile and resource.
151 active_layer->tilings()->tiling_at(0)->CreateAllTilesForTesting(); 151 active_layer->tilings()->tiling_at(0)->CreateAllTilesForTesting();
152 host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting( 152 host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(
153 active_layer->tilings()->tiling_at(0)->AllTilesForTesting()); 153 active_layer->tilings()->tiling_at(0)->AllTilesForTesting());
154 154
155 // Draw. 155 // Draw.
156 active_layer->draw_properties().visible_content_rect = 156 active_layer->draw_properties().visible_content_rect =
157 gfx::Rect(active_layer->bounds()); 157 gfx::Rect(active_layer->bounds());
158 MockQuadCuller quad_culler; 158 MockOcclusionTracker<LayerImpl> occlusion_tracker;
159 scoped_ptr<RenderPass> render_pass = RenderPass::Create();
160 MockQuadCuller quad_culler(render_pass.get(), &occlusion_tracker);
159 AppendQuadsData data; 161 AppendQuadsData data;
160 active_layer->WillDraw(DRAW_MODE_SOFTWARE, NULL); 162 active_layer->WillDraw(DRAW_MODE_SOFTWARE, NULL);
161 active_layer->AppendQuads(&quad_culler, &data); 163 active_layer->AppendQuads(&quad_culler, &data);
162 active_layer->DidDraw(NULL); 164 active_layer->DidDraw(NULL);
163 165
164 EXPECT_EQ(DrawQuad::TILED_CONTENT, quad_culler.quad_list()[0]->material); 166 EXPECT_EQ(DrawQuad::TILED_CONTENT, quad_culler.quad_list()[0]->material);
165 167
166 // Tiles are ready at correct scale, so should not set had_incomplete_tile. 168 // Tiles are ready at correct scale, so should not set had_incomplete_tile.
167 EXPECT_FALSE(data.had_incomplete_tile); 169 EXPECT_FALSE(data.had_incomplete_tile);
168 } 170 }
169 171
170 } // namespace 172 } // namespace
171 } // namespace cc 173 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/nine_patch_layer_impl_unittest.cc ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698