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

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

Issue 16293004: Update gpu/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 7 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
Index: gpu/command_buffer/service/async_pixel_transfer_delegate_share_group.cc
diff --git a/gpu/command_buffer/service/async_pixel_transfer_delegate_share_group.cc b/gpu/command_buffer/service/async_pixel_transfer_delegate_share_group.cc
index 7a9c1a96749da9c8e828e6b94bb33aaa049f454e..38064d076775d5fbb5821a92baeb7fb75d99a29c 100644
--- a/gpu/command_buffer/service/async_pixel_transfer_delegate_share_group.cc
+++ b/gpu/command_buffer/service/async_pixel_transfer_delegate_share_group.cc
@@ -86,7 +86,7 @@ class TransferThread : public base::Thread {
}
surface_ = gfx::GLSurface::CreateOffscreenGLSurface(false, gfx::Size(1, 1));
- if (!surface_) {
+ if (!surface_.get()) {
LOG(ERROR) << "Unable to create GLSurface";
caller_wait->Signal();
return;
@@ -97,15 +97,15 @@ class TransferThread : public base::Thread {
// upload (that would hopefully be optimized as a DMA transfer by the
// driver).
context_ = gfx::GLContext::CreateGLContext(parent_context->share_group(),
- surface_,
+ surface_.get(),
gfx::PreferIntegratedGpu);
- if (!context_) {
+ if (!context_.get()) {
LOG(ERROR) << "Unable to create GLContext.";
caller_wait->Signal();
return;
}
- context_->MakeCurrent(surface_);
+ context_->MakeCurrent(surface_.get());
initialized_ = true;
caller_wait->Signal();
}
@@ -229,7 +229,7 @@ class TransferStateInternal
DCHECK_EQ(0, tex_params.level);
base::TimeTicks begin_time;
- if (texture_upload_stats)
+ if (texture_upload_stats.get())
begin_time = base::TimeTicks::HighResNow();
void* data =
@@ -252,7 +252,7 @@ class TransferStateInternal
MarkAsCompleted();
- if (texture_upload_stats) {
+ if (texture_upload_stats.get()) {
texture_upload_stats->AddUpload(base::TimeTicks::HighResNow() -
begin_time);
}
@@ -390,7 +390,7 @@ void AsyncPixelTransferDelegateShareGroup::WaitForTransferCompletion(
AsyncPixelTransferState* transfer_state) {
scoped_refptr<TransferStateInternal> state =
static_cast<AsyncTransferStateImpl*>(transfer_state)->internal();
- DCHECK(state);
+ DCHECK(state.get());
DCHECK(state->texture_id());
if (state->TransferIsInProgress()) {
@@ -417,7 +417,7 @@ void AsyncPixelTransferDelegateShareGroup::AsyncTexImage2D(
DCHECK(mem_params.shared_memory);
DCHECK_LE(mem_params.shm_data_offset + mem_params.shm_data_size,
mem_params.shm_size);
- DCHECK(state);
+ DCHECK(state.get());
DCHECK(state->texture_id());
DCHECK(!state->TransferIsInProgress());
DCHECK_EQ(static_cast<GLenum>(GL_TEXTURE_2D), tex_params.target);
@@ -482,13 +482,13 @@ void AsyncPixelTransferDelegateShareGroup::AsyncTexSubImage2D(
}
uint32 AsyncPixelTransferDelegateShareGroup::GetTextureUploadCount() {
- DCHECK(texture_upload_stats_);
+ DCHECK(texture_upload_stats_.get());
return texture_upload_stats_->GetStats(NULL);
}
base::TimeDelta
AsyncPixelTransferDelegateShareGroup::GetTotalTextureUploadTime() {
- DCHECK(texture_upload_stats_);
+ DCHECK(texture_upload_stats_.get());
base::TimeDelta total_texture_upload_time;
texture_upload_stats_->GetStats(&total_texture_upload_time);
return total_texture_upload_time;
« no previous file with comments | « gpu/command_buffer/service/async_pixel_transfer_delegate_egl.cc ('k') | gpu/command_buffer/service/buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698