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

Unified Diff: cc/resources/resource_provider.cc

Issue 502203003: Remove implicit conversions from scoped_refptr to T* in cc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/resources/raster_worker_pool_unittest.cc ('k') | cc/resources/tile.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_provider.cc
diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc
index 521eb134755251e874f7f72b9902cea91d9810fe..1ad6d3df9142a2dd39b0e40cfe5db4a021facded 100644
--- a/cc/resources/resource_provider.cc
+++ b/cc/resources/resource_provider.cc
@@ -1060,7 +1060,7 @@ const ResourceProvider::Resource* ResourceProvider::LockForRead(ResourceId id) {
resource->lock_for_read_count++;
if (resource->read_lock_fences_enabled) {
- if (current_read_lock_fence_)
+ if (current_read_lock_fence_.get())
current_read_lock_fence_->Set();
resource->read_lock_fence = current_read_lock_fence_;
}
@@ -1524,7 +1524,7 @@ void ResourceProvider::ReceiveReturnsFromParent(
// Need to wait for the current read lock fence to pass before we can
// recycle this resource.
if (resource->read_lock_fences_enabled) {
- if (current_read_lock_fence_)
+ if (current_read_lock_fence_.get())
current_read_lock_fence_->Set();
resource->read_lock_fence = current_read_lock_fence_;
}
@@ -2261,12 +2261,14 @@ GLint ResourceProvider::GetActiveTextureUnit(GLES2Interface* gl) {
}
GLES2Interface* ResourceProvider::ContextGL() const {
- ContextProvider* context_provider = output_surface_->context_provider();
+ scoped_refptr<ContextProvider> context_provider =
enne (OOO) 2014/08/25 23:39:12 This is a local alias, not an ownership transfer.
dcheng 2014/08/25 23:44:56 Done.
+ output_surface_->context_provider();
return context_provider ? context_provider->ContextGL() : NULL;
}
class GrContext* ResourceProvider::GrContext() const {
- ContextProvider* context_provider = output_surface_->context_provider();
enne (OOO) 2014/08/25 23:39:11 This is a local alias, not an ownership transfer.
enne (OOO) 2014/08/25 23:39:12 Same here.
dcheng 2014/08/25 23:44:56 Done.
+ scoped_refptr<ContextProvider> context_provider =
+ output_surface_->context_provider();
return context_provider ? context_provider->GrContext() : NULL;
}
« no previous file with comments | « cc/resources/raster_worker_pool_unittest.cc ('k') | cc/resources/tile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698