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

Side by Side Diff: content/common/gpu/gpu_channel_manager.cc

Issue 16703020: Rewrite scoped_ptr<T>(NULL) to use the default ctor in content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up insanity Created 7 years, 6 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/cc_messages.cc ('k') | content/common/gpu/gpu_memory_manager_unittest.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/child/child_thread.h" 9 #include "content/child/child_thread.h"
10 #include "content/common/gpu/gpu_channel.h" 10 #include "content/common/gpu/gpu_channel.h"
(...skipping 20 matching lines...) Expand all
31 31
32 GpuChannelManager::GpuChannelManager(ChildThread* gpu_child_thread, 32 GpuChannelManager::GpuChannelManager(ChildThread* gpu_child_thread,
33 GpuWatchdog* watchdog, 33 GpuWatchdog* watchdog,
34 base::MessageLoopProxy* io_message_loop, 34 base::MessageLoopProxy* io_message_loop,
35 base::WaitableEvent* shutdown_event) 35 base::WaitableEvent* shutdown_event)
36 : weak_factory_(this), 36 : weak_factory_(this),
37 io_message_loop_(io_message_loop), 37 io_message_loop_(io_message_loop),
38 shutdown_event_(shutdown_event), 38 shutdown_event_(shutdown_event),
39 gpu_child_thread_(gpu_child_thread), 39 gpu_child_thread_(gpu_child_thread),
40 gpu_memory_manager_( 40 gpu_memory_manager_(
41 this, GpuMemoryManager::kDefaultMaxSurfacesWithFrontbufferSoftLimit), 41 this,
42 GpuMemoryManager::kDefaultMaxSurfacesWithFrontbufferSoftLimit),
42 watchdog_(watchdog), 43 watchdog_(watchdog),
43 sync_point_manager_(new SyncPointManager), 44 sync_point_manager_(new SyncPointManager) {
44 program_cache_(NULL) {
45 DCHECK(gpu_child_thread); 45 DCHECK(gpu_child_thread);
46 DCHECK(io_message_loop); 46 DCHECK(io_message_loop);
47 DCHECK(shutdown_event); 47 DCHECK(shutdown_event);
48 } 48 }
49 49
50 GpuChannelManager::~GpuChannelManager() { 50 GpuChannelManager::~GpuChannelManager() {
51 gpu_channels_.clear(); 51 gpu_channels_.clear();
52 if (default_offscreen_surface_.get()) { 52 if (default_offscreen_surface_.get()) {
53 default_offscreen_surface_->Destroy(); 53 default_offscreen_surface_->Destroy();
54 default_offscreen_surface_ = NULL; 54 default_offscreen_surface_ = NULL;
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 290
291 gfx::GLSurface* GpuChannelManager::GetDefaultOffscreenSurface() { 291 gfx::GLSurface* GpuChannelManager::GetDefaultOffscreenSurface() {
292 if (!default_offscreen_surface_.get()) { 292 if (!default_offscreen_surface_.get()) {
293 default_offscreen_surface_ = 293 default_offscreen_surface_ =
294 gfx::GLSurface::CreateOffscreenGLSurface(false, gfx::Size(1, 1)); 294 gfx::GLSurface::CreateOffscreenGLSurface(false, gfx::Size(1, 1));
295 } 295 }
296 return default_offscreen_surface_.get(); 296 return default_offscreen_surface_.get();
297 } 297 }
298 298
299 } // namespace content 299 } // namespace content
OLDNEW
« no previous file with comments | « content/common/cc_messages.cc ('k') | content/common/gpu/gpu_memory_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698