summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authorrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-27 10:36:11 +0000
committerrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-27 10:36:11 +0000
commit198b590bb15422d06a14f59700c72f2fa71b1314 (patch)
treedf70ac39d5a72ee95a89b8dfc2aa679dcb254f30 /cc
parent4fbcb6bf01014e8508e7e2258055ed1750bd5aa0 (diff)
downloadchromium_src-198b590bb15422d06a14f59700c72f2fa71b1314.zip
chromium_src-198b590bb15422d06a14f59700c72f2fa71b1314.tar.gz
chromium_src-198b590bb15422d06a14f59700c72f2fa71b1314.tar.bz2
Update Linux to use scoped_refptr<T>::get() rather than implicit "operator T*"
Fixes a number of cases either not caught by the automated tool or that have recently regressed. BUG=206189 TBR=darin Review URL: https://chromiumcodereview.appspot.com/17948002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208882 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r--cc/layers/texture_layer.h2
-rw-r--r--cc/resources/pixel_buffer_raster_worker_pool.cc4
-rw-r--r--cc/resources/raster_worker_pool.cc2
-rw-r--r--cc/resources/resource_provider_unittest.cc12
-rw-r--r--cc/test/layer_tree_test.cc2
-rw-r--r--cc/trees/layer_tree_host.cc2
-rw-r--r--cc/trees/layer_tree_host_unittest_context.cc2
-rw-r--r--cc/trees/layer_tree_host_unittest_scroll.cc8
8 files changed, 16 insertions, 18 deletions
diff --git a/cc/layers/texture_layer.h b/cc/layers/texture_layer.h
index cbc42ce..6be2a01 100644
--- a/cc/layers/texture_layer.h
+++ b/cc/layers/texture_layer.h
@@ -94,7 +94,7 @@ class CC_EXPORT TextureLayer : public Layer {
public:
explicit MainThreadReference(MailboxHolder* holder);
~MainThreadReference();
- MailboxHolder* holder() { return holder_; }
+ MailboxHolder* holder() { return holder_.get(); }
private:
scoped_refptr<MailboxHolder> holder_;
diff --git a/cc/resources/pixel_buffer_raster_worker_pool.cc b/cc/resources/pixel_buffer_raster_worker_pool.cc
index 14a2536..bbdb532 100644
--- a/cc/resources/pixel_buffer_raster_worker_pool.cc
+++ b/cc/resources/pixel_buffer_raster_worker_pool.cc
@@ -229,7 +229,7 @@ void PixelBufferRasterWorkerPool::CheckForCompletedUploads() {
TaskDeque tasks_with_uploads_to_force;
TaskDeque::iterator it = tasks_with_pending_upload_.begin();
while (it != tasks_with_pending_upload_.end()) {
- internal::RasterWorkerPoolTask* task = *it;
+ internal::RasterWorkerPoolTask* task = it->get();
DCHECK(pixel_buffer_tasks_.find(task) != pixel_buffer_tasks_.end());
// Force all uploads required for activation to complete.
@@ -339,7 +339,7 @@ void PixelBufferRasterWorkerPool::ScheduleMoreTasks() {
if (new_bytes_pending_upload > kMaxPendingUploadBytes)
break;
- internal::WorkerPoolTask* pixel_buffer_task = pixel_buffer_it->second;
+ internal::WorkerPoolTask* pixel_buffer_task = pixel_buffer_it->second.get();
// If raster has finished, just update |bytes_pending_upload|.
if (pixel_buffer_task && pixel_buffer_task->HasCompleted()) {
diff --git a/cc/resources/raster_worker_pool.cc b/cc/resources/raster_worker_pool.cc
index 84a8e8a..340f37e 100644
--- a/cc/resources/raster_worker_pool.cc
+++ b/cc/resources/raster_worker_pool.cc
@@ -495,7 +495,7 @@ void RasterWorkerPool::SetRasterTaskGraph(RasterTaskGraph* graph) {
scoped_refptr<internal::WorkerPoolTask> new_raster_finished_task(
new RasterFinishedWorkerPoolTaskImpl(
- base::MessageLoopProxy::current(),
+ base::MessageLoopProxy::current().get(),
base::Bind(&RasterWorkerPool::OnRasterFinished,
weak_ptr_factory_.GetWeakPtr(),
schedule_raster_tasks_count_)));
diff --git a/cc/resources/resource_provider_unittest.cc b/cc/resources/resource_provider_unittest.cc
index b7abd10..8a5b8ef 100644
--- a/cc/resources/resource_provider_unittest.cc
+++ b/cc/resources/resource_provider_unittest.cc
@@ -217,7 +217,7 @@ class ResourceProviderContext : public TestWebGraphicsContext3D {
ASSERT_TRUE(current_texture_);
ASSERT_EQ(static_cast<unsigned>(GL_TEXTURE_2D), target);
ASSERT_FALSE(level);
- ASSERT_TRUE(textures_[current_texture_]);
+ ASSERT_TRUE(textures_[current_texture_].get());
ASSERT_EQ(textures_[current_texture_]->format, format);
ASSERT_EQ(static_cast<unsigned>(GL_UNSIGNED_BYTE), type);
ASSERT_TRUE(pixels);
@@ -229,7 +229,7 @@ class ResourceProviderContext : public TestWebGraphicsContext3D {
ASSERT_TRUE(current_texture_);
ASSERT_EQ(static_cast<unsigned>(GL_TEXTURE_2D), target);
scoped_refptr<Texture> texture = textures_[current_texture_];
- ASSERT_TRUE(texture);
+ ASSERT_TRUE(texture.get());
if (param != GL_TEXTURE_MIN_FILTER)
return;
texture->filter = value;
@@ -264,7 +264,7 @@ class ResourceProviderContext : public TestWebGraphicsContext3D {
void GetPixels(gfx::Size size, WGC3Denum format, uint8_t* pixels) {
ASSERT_TRUE(current_texture_);
scoped_refptr<Texture> texture = textures_[current_texture_];
- ASSERT_TRUE(texture);
+ ASSERT_TRUE(texture.get());
ASSERT_EQ(texture->size, size);
ASSERT_EQ(texture->format, format);
memcpy(pixels, texture->data.get(), TextureSize(size, format));
@@ -273,7 +273,7 @@ class ResourceProviderContext : public TestWebGraphicsContext3D {
WGC3Denum GetTextureFilter() {
DCHECK(current_texture_);
scoped_refptr<Texture> texture = textures_[current_texture_];
- DCHECK(texture);
+ DCHECK(texture.get());
return texture->filter;
}
@@ -291,7 +291,7 @@ class ResourceProviderContext : public TestWebGraphicsContext3D {
void AllocateTexture(gfx::Size size, WGC3Denum format) {
ASSERT_TRUE(current_texture_);
scoped_refptr<Texture> texture = textures_[current_texture_];
- ASSERT_TRUE(texture);
+ ASSERT_TRUE(texture.get());
texture->Reallocate(size, format);
}
@@ -302,7 +302,7 @@ class ResourceProviderContext : public TestWebGraphicsContext3D {
const void* pixels) {
ASSERT_TRUE(current_texture_);
scoped_refptr<Texture> texture = textures_[current_texture_];
- ASSERT_TRUE(texture);
+ ASSERT_TRUE(texture.get());
ASSERT_TRUE(texture->data.get());
ASSERT_TRUE(xoffset >= 0 && xoffset + width <= texture->size.width());
ASSERT_TRUE(yoffset >= 0 && yoffset + height <= texture->size.height());
diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc
index df47b3d..1d4a797 100644
--- a/cc/test/layer_tree_test.cc
+++ b/cc/test/layer_tree_test.cc
@@ -393,7 +393,7 @@ void LayerTreeTest::PostSetVisibleToMainThread(bool visible) {
void LayerTreeTest::DoBeginTest() {
client_ = LayerTreeHostClientForTesting::Create(this);
- DCHECK(!impl_thread_ || impl_thread_->message_loop_proxy());
+ DCHECK(!impl_thread_ || impl_thread_->message_loop_proxy().get());
layer_tree_host_ = LayerTreeHostForTesting::Create(
this,
client_.get(),
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index e86aaf5..3d97f15 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -107,7 +107,7 @@ LayerTreeHost::LayerTreeHost(LayerTreeHostClient* client,
bool LayerTreeHost::Initialize(
scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner) {
- if (impl_task_runner)
+ if (impl_task_runner.get())
return InitializeProxy(ThreadProxy::Create(this, impl_task_runner));
else
return InitializeProxy(SingleThreadProxy::Create(this));
diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc
index 58272df..94f15c2 100644
--- a/cc/trees/layer_tree_host_unittest_context.cc
+++ b/cc/trees/layer_tree_host_unittest_context.cc
@@ -1586,7 +1586,7 @@ class LayerTreeHostTestCannotCreateIfCannotCreateOutputSurface
if (threaded) {
impl_thread.reset(new base::Thread("LayerTreeTest"));
ASSERT_TRUE(impl_thread->Start());
- ASSERT_TRUE(impl_thread->message_loop_proxy());
+ ASSERT_TRUE(impl_thread->message_loop_proxy().get());
}
LayerTreeSettings settings;
diff --git a/cc/trees/layer_tree_host_unittest_scroll.cc b/cc/trees/layer_tree_host_unittest_scroll.cc
index f4cf091..8582d8f 100644
--- a/cc/trees/layer_tree_host_unittest_scroll.cc
+++ b/cc/trees/layer_tree_host_unittest_scroll.cc
@@ -734,11 +734,9 @@ TEST(LayerTreeHostFlingTest, DidStopFlingingThread) {
impl_thread.message_loop_proxy().get(), &received_stop_flinging);
FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D);
- ASSERT_TRUE(impl_thread.message_loop_proxy());
- scoped_ptr<LayerTreeHost> layer_tree_host =
- LayerTreeHost::Create(&client,
- settings,
- impl_thread.message_loop_proxy());
+ ASSERT_TRUE(impl_thread.message_loop_proxy().get());
+ scoped_ptr<LayerTreeHost> layer_tree_host = LayerTreeHost::Create(
+ &client, settings, impl_thread.message_loop_proxy());
impl_thread.message_loop_proxy()
->PostTask(FROM_HERE,