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

Side by Side Diff: content/common/gpu/gpu_channel_manager.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
« no previous file with comments | « content/common/gpu/gpu_channel.cc ('k') | content/common/gpu/gpu_command_buffer_stub.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/common/gpu/gpu_channel_manager.h" 5 #include "content/common/gpu/gpu_channel_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "content/common/child_thread.h" 9 #include "content/common/child_thread.h"
10 #include "content/common/gpu/gpu_channel.h" 10 #include "content/common/gpu/gpu_channel.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 watchdog_(watchdog), 43 watchdog_(watchdog),
44 sync_point_manager_(new SyncPointManager), 44 sync_point_manager_(new SyncPointManager),
45 program_cache_(NULL) { 45 program_cache_(NULL) {
46 DCHECK(gpu_child_thread); 46 DCHECK(gpu_child_thread);
47 DCHECK(io_message_loop); 47 DCHECK(io_message_loop);
48 DCHECK(shutdown_event); 48 DCHECK(shutdown_event);
49 } 49 }
50 50
51 GpuChannelManager::~GpuChannelManager() { 51 GpuChannelManager::~GpuChannelManager() {
52 gpu_channels_.clear(); 52 gpu_channels_.clear();
53 if (default_offscreen_surface_.get()) { 53 if (default_offscreen_surface_) {
54 default_offscreen_surface_->Destroy(); 54 default_offscreen_surface_->Destroy();
55 default_offscreen_surface_ = NULL; 55 default_offscreen_surface_ = NULL;
56 } 56 }
57 DCHECK(image_operations_.empty()); 57 DCHECK(image_operations_.empty());
58 } 58 }
59 59
60 gpu::gles2::ProgramCache* GpuChannelManager::program_cache() { 60 gpu::gles2::ProgramCache* GpuChannelManager::program_cache() {
61 if (!program_cache_.get() && 61 if (!program_cache_.get() &&
62 (gfx::g_driver_gl.ext.b_ARB_get_program_binary || 62 (gfx::g_driver_gl.ext.b_ARB_get_program_binary ||
63 gfx::g_driver_gl.ext.b_OES_get_program_binary) && 63 gfx::g_driver_gl.ext.b_OES_get_program_binary) &&
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 FROM_HERE, 283 FROM_HERE,
284 base::Bind(&GpuChannelManager::OnLoseAllContexts, 284 base::Bind(&GpuChannelManager::OnLoseAllContexts,
285 weak_factory_.GetWeakPtr())); 285 weak_factory_.GetWeakPtr()));
286 } 286 }
287 287
288 void GpuChannelManager::OnLoseAllContexts() { 288 void GpuChannelManager::OnLoseAllContexts() {
289 gpu_channels_.clear(); 289 gpu_channels_.clear();
290 } 290 }
291 291
292 gfx::GLSurface* GpuChannelManager::GetDefaultOffscreenSurface() { 292 gfx::GLSurface* GpuChannelManager::GetDefaultOffscreenSurface() {
293 if (!default_offscreen_surface_.get()) { 293 if (!default_offscreen_surface_) {
294 default_offscreen_surface_ = gfx::GLSurface::CreateOffscreenGLSurface( 294 default_offscreen_surface_ = gfx::GLSurface::CreateOffscreenGLSurface(
295 false, gfx::Size(1, 1)); 295 false, gfx::Size(1, 1));
296 } 296 }
297 return default_offscreen_surface_.get(); 297 return default_offscreen_surface_.get();
298 } 298 }
299 299
300 } // namespace content 300 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel.cc ('k') | content/common/gpu/gpu_command_buffer_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698