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

Unified Diff: gpu/command_buffer/service/query_manager.cc

Issue 500243002: Remove implicit conversions from scoped_refptr to T* in gpu/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert silliness 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 | « gpu/command_buffer/service/program_manager.cc ('k') | gpu/command_buffer/service/texture_definition.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/query_manager.cc
diff --git a/gpu/command_buffer/service/query_manager.cc b/gpu/command_buffer/service/query_manager.cc
index ffb54cca5142a635d692d955f547c9620322ca73..a8b47f192df3460565405ea7e7325f4561abe183 100644
--- a/gpu/command_buffer/service/query_manager.cc
+++ b/gpu/command_buffer/service/query_manager.cc
@@ -88,7 +88,7 @@ bool AsyncPixelTransfersCompletedQuery::End(
// use-after-free of the memory.
scoped_refptr<Buffer> buffer =
manager()->decoder()->GetSharedMemoryBuffer(shm_id());
- if (!buffer)
+ if (!buffer.get())
return false;
AsyncMemoryParams mem_params(buffer, shm_offset(), sizeof(QuerySync));
if (!mem_params.GetDataAddress())
@@ -99,8 +99,8 @@ bool AsyncPixelTransfersCompletedQuery::End(
// Ask AsyncPixelTransferDelegate to run completion callback after all
// previous async transfers are done. No guarantee that callback is run
// on the current thread.
- manager()->decoder()->GetAsyncPixelTransferManager()
- ->AsyncNotifyCompletion(mem_params, observer_);
+ manager()->decoder()->GetAsyncPixelTransferManager()->AsyncNotifyCompletion(
+ mem_params, observer_.get());
return AddToPendingTransferQueue(submit_count);
}
@@ -128,7 +128,7 @@ void AsyncPixelTransfersCompletedQuery::Destroy(bool /* have_context */) {
}
AsyncPixelTransfersCompletedQuery::~AsyncPixelTransfersCompletedQuery() {
- if (observer_)
+ if (observer_.get())
observer_->Cancel();
}
« no previous file with comments | « gpu/command_buffer/service/program_manager.cc ('k') | gpu/command_buffer/service/texture_definition.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698