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; |
} |