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

Side by Side Diff: content/renderer/pepper/pepper_platform_context_3d_impl.cc

Issue 14081010: Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix some gtk issues Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/pepper/pepper_platform_context_3d_impl.h" 5 #include "content/renderer/pepper/pepper_platform_context_3d_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "content/common/gpu/client/context_provider_command_buffer.h" 8 #include "content/common/gpu/client/context_provider_command_buffer.h"
9 #include "content/common/gpu/client/gpu_channel_host.h" 9 #include "content/common/gpu/client/gpu_channel_host.h"
10 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 10 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 return true; 46 return true;
47 47
48 RenderThreadImpl* render_thread = RenderThreadImpl::current(); 48 RenderThreadImpl* render_thread = RenderThreadImpl::current();
49 if (!render_thread) 49 if (!render_thread)
50 return false; 50 return false;
51 51
52 gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu; 52 gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu;
53 53
54 channel_ = render_thread->EstablishGpuChannelSync( 54 channel_ = render_thread->EstablishGpuChannelSync(
55 CAUSE_FOR_GPU_LAUNCH_PEPPERPLATFORMCONTEXT3DIMPL_INITIALIZE); 55 CAUSE_FOR_GPU_LAUNCH_PEPPERPLATFORMCONTEXT3DIMPL_INITIALIZE);
56 if (!channel_.get()) 56 if (!channel_)
57 return false; 57 return false;
58 DCHECK(channel_->state() == GpuChannelHost::kConnected); 58 DCHECK(channel_->state() == GpuChannelHost::kConnected);
59 59
60 gfx::Size surface_size; 60 gfx::Size surface_size;
61 std::vector<int32> attribs; 61 std::vector<int32> attribs;
62 // TODO(alokp): Change GpuChannelHost::CreateOffscreenCommandBuffer() 62 // TODO(alokp): Change GpuChannelHost::CreateOffscreenCommandBuffer()
63 // interface to accept width and height in the attrib_list so that 63 // interface to accept width and height in the attrib_list so that
64 // we do not need to filter for width and height here. 64 // we do not need to filter for width and height here.
65 if (attrib_list) { 65 if (attrib_list) {
66 for (const int32_t* attr = attrib_list; 66 for (const int32_t* attr = attrib_list;
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 void PlatformContext3DImpl::OnConsoleMessage(const std::string& msg, int id) { 209 void PlatformContext3DImpl::OnConsoleMessage(const std::string& msg, int id) {
210 DCHECK(command_buffer_); 210 DCHECK(command_buffer_);
211 211
212 if (!console_message_callback_.is_null()) 212 if (!console_message_callback_.is_null())
213 console_message_callback_.Run(msg, id); 213 console_message_callback_.Run(msg, id);
214 } 214 }
215 215
216 } // namespace content 216 } // namespace content
217 217
218 #endif // ENABLE_GPU 218 #endif // ENABLE_GPU
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_file_io_host.cc ('k') | content/renderer/pepper/pepper_platform_image_2d_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698