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

Unified Diff: webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc

Issue 16155009: Update webkit/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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: webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
diff --git a/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc b/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
index b230e06c8a41c79cdee3f817ed996e7ca2f8fea0..55bd12e634143df02baeccc133f8156d1ec417fc 100644
--- a/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
+++ b/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
@@ -357,7 +357,7 @@ scoped_ptr<GpuMemoryBuffer> ImageFactoryInProcess::CreateGpuMemoryBuffer(
gfx::GLImage::CreateGLImageForGpuMemoryBuffer(buffer->GetNativeBuffer(),
gfx::Size(width, height));
*image_id = ++next_id_; // Valid image_ids start from 1.
- image_manager_->AddImage(gl_image, *image_id);
+ image_manager_->AddImage(gl_image.get(), *image_id);
return buffer.Pass();
}
@@ -613,7 +613,7 @@ bool GLInProcessContext::Initialize(
else
surface_ = gfx::GLSurface::CreateViewGLSurface(false, window);
- if (!surface_) {
+ if (!surface_.get()) {
LOG(ERROR) << "Could not create GLSurface.";
Destroy();
return false;
@@ -621,17 +621,15 @@ bool GLInProcessContext::Initialize(
if (g_use_virtualized_gl_context) {
context_ = share_group->GetSharedContext();
- if (!context_) {
- context_ = gfx::GLContext::CreateGLContext(share_group.get(),
- surface_.get(),
- gpu_preference);
- share_group->SetSharedContext(context_);
+ if (!context_.get()) {
+ context_ = gfx::GLContext::CreateGLContext(
+ share_group.get(), surface_.get(), gpu_preference);
+ share_group->SetSharedContext(context_.get());
}
- context_ = new ::gpu::GLContextVirtual(share_group.get(),
- context_,
- decoder_->AsWeakPtr());
- if (context_->Initialize(surface_, gpu_preference)) {
+ context_ = new ::gpu::GLContextVirtual(
+ share_group.get(), context_.get(), decoder_->AsWeakPtr());
+ if (context_->Initialize(surface_.get(), gpu_preference)) {
VLOG(1) << "Created virtual GL context.";
} else {
context_ = NULL;
@@ -642,13 +640,13 @@ bool GLInProcessContext::Initialize(
gpu_preference);
}
- if (!context_) {
+ if (!context_.get()) {
LOG(ERROR) << "Could not create GLContext.";
Destroy();
return false;
}
- if (!context_->MakeCurrent(surface_)) {
+ if (!context_->MakeCurrent(surface_.get())) {
LOG(ERROR) << "Could not make context current.";
Destroy();
return false;
@@ -716,7 +714,7 @@ bool GLInProcessContext::Initialize(
transfer_buffer_.get(),
true,
false,
- image_factory_));
+ image_factory_.get()));
if (!gles2_implementation_->Initialize(
kStartTransferBufferSize,
« no previous file with comments | « webkit/common/gpu/test_context_provider_factory.cc ('k') | webkit/common/gpu/webgraphicscontext3d_in_process_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698