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

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

Issue 643583003: [C++11 Allowed Features] Declares a type-safe null pointer converting from NULL to nullptr in src/… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: foramted. Created 6 years, 2 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
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/quads/draw_quad.h" 8 #include "cc/quads/draw_quad.h"
9 #include "cc/resources/tile_priority.h" 9 #include "cc/resources/tile_priority.h"
10 #include "cc/test/fake_impl_proxy.h" 10 #include "cc/test/fake_impl_proxy.h"
(...skipping 29 matching lines...) Expand all
40 host_impl_(ImplSidePaintingSettings(), 40 host_impl_(ImplSidePaintingSettings(),
41 &proxy_, 41 &proxy_,
42 &shared_bitmap_manager_) { 42 &shared_bitmap_manager_) {
43 tiling_client_.SetTileSize(ImplSidePaintingSettings().default_tile_size); 43 tiling_client_.SetTileSize(ImplSidePaintingSettings().default_tile_size);
44 host_impl_.CreatePendingTree(); 44 host_impl_.CreatePendingTree();
45 host_impl_.InitializeRenderer(FakeOutputSurface::Create3d()); 45 host_impl_.InitializeRenderer(FakeOutputSurface::Create3d());
46 } 46 }
47 47
48 scoped_ptr<TestablePictureImageLayerImpl> CreateLayer(int id, 48 scoped_ptr<TestablePictureImageLayerImpl> CreateLayer(int id,
49 WhichTree which_tree) { 49 WhichTree which_tree) {
50 LayerTreeImpl* tree = NULL; 50 LayerTreeImpl* tree = nullptr;
51 switch (which_tree) { 51 switch (which_tree) {
52 case ACTIVE_TREE: 52 case ACTIVE_TREE:
53 tree = host_impl_.active_tree(); 53 tree = host_impl_.active_tree();
54 break; 54 break;
55 case PENDING_TREE: 55 case PENDING_TREE:
56 tree = host_impl_.pending_tree(); 56 tree = host_impl_.pending_tree();
57 break; 57 break;
58 case NUM_TREES: 58 case NUM_TREES:
59 NOTREACHED(); 59 NOTREACHED();
60 break; 60 break;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // Create tile and resource. 141 // Create tile and resource.
142 active_layer->tilings()->tiling_at(0)->CreateAllTilesForTesting(); 142 active_layer->tilings()->tiling_at(0)->CreateAllTilesForTesting();
143 host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting( 143 host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(
144 active_layer->tilings()->tiling_at(0)->AllTilesForTesting()); 144 active_layer->tilings()->tiling_at(0)->AllTilesForTesting());
145 145
146 // Draw. 146 // Draw.
147 active_layer->draw_properties().visible_content_rect = 147 active_layer->draw_properties().visible_content_rect =
148 gfx::Rect(active_layer->bounds()); 148 gfx::Rect(active_layer->bounds());
149 scoped_ptr<RenderPass> render_pass = RenderPass::Create(); 149 scoped_ptr<RenderPass> render_pass = RenderPass::Create();
150 AppendQuadsData data; 150 AppendQuadsData data;
151 active_layer->WillDraw(DRAW_MODE_SOFTWARE, NULL); 151 active_layer->WillDraw(DRAW_MODE_SOFTWARE, nullptr);
152 active_layer->AppendQuads(render_pass.get(), Occlusion(), &data); 152 active_layer->AppendQuads(render_pass.get(), Occlusion(), &data);
153 active_layer->DidDraw(NULL); 153 active_layer->DidDraw(nullptr);
154 154
155 EXPECT_EQ(DrawQuad::TILED_CONTENT, render_pass->quad_list.front()->material); 155 EXPECT_EQ(DrawQuad::TILED_CONTENT, render_pass->quad_list.front()->material);
156 156
157 // Tiles are ready at correct scale, so should not set had_incomplete_tile. 157 // Tiles are ready at correct scale, so should not set had_incomplete_tile.
158 EXPECT_EQ(0, data.num_incomplete_tiles); 158 EXPECT_EQ(0, data.num_incomplete_tiles);
159 } 159 }
160 160
161 } // namespace 161 } // namespace
162 } // namespace cc 162 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698