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

Side by Side Diff: cc/test/layer_tree_pixel_test.cc

Issue 657103003: cc: Change scoped_ptr<T>() to nullptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « cc/test/animation_test_common.cc ('k') | cc/trees/damage_tracker_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/test/layer_tree_pixel_test.h" 5 #include "cc/test/layer_tree_pixel_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "cc/base/switches.h" 9 #include "cc/base/switches.h"
10 #include "cc/layers/solid_color_layer.h" 10 #include "cc/layers/solid_color_layer.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 layer->SetBounds(rect.size()); 123 layer->SetBounds(rect.size());
124 layer->SetPosition(rect.origin()); 124 layer->SetPosition(rect.origin());
125 layer->SetBackgroundColor(color); 125 layer->SetBackgroundColor(color);
126 return layer; 126 return layer;
127 } 127 }
128 128
129 void LayerTreePixelTest::EndTest() { 129 void LayerTreePixelTest::EndTest() {
130 // Drop TextureMailboxes on the main thread so that they can be cleaned up and 130 // Drop TextureMailboxes on the main thread so that they can be cleaned up and
131 // the pending callbacks will fire. 131 // the pending callbacks will fire.
132 for (size_t i = 0; i < texture_layers_.size(); ++i) { 132 for (size_t i = 0; i < texture_layers_.size(); ++i) {
133 texture_layers_[i]->SetTextureMailbox(TextureMailbox(), 133 texture_layers_[i]->SetTextureMailbox(TextureMailbox(), nullptr);
134 scoped_ptr<SingleReleaseCallback>());
135 } 134 }
136 135
137 TryEndTest(); 136 TryEndTest();
138 } 137 }
139 138
140 void LayerTreePixelTest::TryEndTest() { 139 void LayerTreePixelTest::TryEndTest() {
141 if (!result_bitmap_) 140 if (!result_bitmap_)
142 return; 141 return;
143 if (pending_texture_mailbox_callbacks_) 142 if (pending_texture_mailbox_callbacks_)
144 return; 143 return;
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 360
362 *texture_mailbox = TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point); 361 *texture_mailbox = TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point);
363 *release_callback = SingleReleaseCallback::Create( 362 *release_callback = SingleReleaseCallback::Create(
364 base::Bind(&LayerTreePixelTest::ReleaseTextureMailbox, 363 base::Bind(&LayerTreePixelTest::ReleaseTextureMailbox,
365 base::Unretained(this), 364 base::Unretained(this),
366 base::Passed(&context), 365 base::Passed(&context),
367 texture_id)); 366 texture_id));
368 } 367 }
369 368
370 } // namespace cc 369 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/animation_test_common.cc ('k') | cc/trees/damage_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698