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

Unified Diff: cc/trees/layer_tree_host_unittest.cc

Issue 500123003: Remove implicit conversions from scoped_refptr to T* in cc/trees/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_perftest.cc ('k') | cc/trees/layer_tree_host_unittest_animation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest.cc
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index 7c1bb813fa4f1c2b1e3949e6e9838f6f6fc9fc13..1fd7f6e2355bf15323858f310a34e2dbf61f7a9a 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -3939,7 +3939,7 @@ class LayerInvalidateCausesDraw : public LayerTreeHostTest {
LayerInvalidateCausesDraw() : num_commits_(0), num_draws_(0) {}
virtual void BeginTest() OVERRIDE {
- ASSERT_TRUE(!!invalidate_layer_)
+ ASSERT_TRUE(!!invalidate_layer_.get())
<< "Derived tests must set this in SetupTree";
// One initial commit.
@@ -4332,14 +4332,14 @@ class LayerTreeHostTestSetMemoryPolicyOnLostOutputSurface
virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback)
OVERRIDE {
- if (!first_context_provider_) {
+ if (!first_context_provider_.get()) {
first_context_provider_ = TestContextProvider::Create();
} else {
- EXPECT_FALSE(second_context_provider_);
+ EXPECT_FALSE(second_context_provider_.get());
second_context_provider_ = TestContextProvider::Create();
}
- scoped_refptr<TestContextProvider> provider(second_context_provider_
+ scoped_refptr<TestContextProvider> provider(second_context_provider_.get()
? second_context_provider_
: first_context_provider_);
scoped_ptr<FakeOutputSurface> output_surface;
@@ -4349,8 +4349,8 @@ class LayerTreeHostTestSetMemoryPolicyOnLostOutputSurface
output_surface = FakeOutputSurface::Create3d(provider);
output_surface->SetMemoryPolicyToSetAtBind(
make_scoped_ptr(new ManagedMemoryPolicy(
- second_context_provider_ ? second_output_surface_memory_limit_
- : first_output_surface_memory_limit_,
+ second_context_provider_.get() ? second_output_surface_memory_limit_
+ : first_output_surface_memory_limit_,
gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE,
ManagedMemoryPolicy::kDefaultNumResourcesLimit)));
return output_surface.Pass();
@@ -4999,8 +4999,9 @@ class LayerTreeHostTestContinuousPainting : public LayerTreeHostTest {
virtual void AfterTest() OVERRIDE {
EXPECT_LE(kExpectedNumCommits, num_commits_);
EXPECT_LE(kExpectedNumCommits, num_draws_);
- int update_count = content_layer_ ? content_layer_->PaintContentsCount()
- : picture_layer_->update_count();
+ int update_count = content_layer_.get()
+ ? content_layer_->PaintContentsCount()
+ : picture_layer_->update_count();
EXPECT_LE(kExpectedNumCommits, update_count);
}
« no previous file with comments | « cc/trees/layer_tree_host_perftest.cc ('k') | cc/trees/layer_tree_host_unittest_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698