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

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

Issue 11722024: Remove some usage of the ENABLE_GPU macro. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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_memory_tracking.h ('k') | content/common/gpu/image_transport_surface.h » ('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_memory_tracking.h" 5 #include "content/common/gpu/gpu_memory_tracking.h"
6 6
7 #if defined(ENABLE_GPU)
8
9 #include "content/common/gpu/gpu_memory_manager.h" 7 #include "content/common/gpu/gpu_memory_manager.h"
10 8
11 namespace content { 9 namespace content {
12 10
13 GpuMemoryTrackingGroup::GpuMemoryTrackingGroup( 11 GpuMemoryTrackingGroup::GpuMemoryTrackingGroup(
14 base::ProcessId pid, 12 base::ProcessId pid,
15 gpu::gles2::MemoryTracker* memory_tracker, 13 gpu::gles2::MemoryTracker* memory_tracker,
16 GpuMemoryManager* memory_manager) 14 GpuMemoryManager* memory_manager)
17 : pid_(pid), 15 : pid_(pid),
18 size_(0), 16 size_(0),
19 hibernated_(false), 17 hibernated_(false),
20 memory_tracker_(memory_tracker), 18 memory_tracker_(memory_tracker),
21 memory_manager_(memory_manager) { 19 memory_manager_(memory_manager) {
22 } 20 }
23 21
24 GpuMemoryTrackingGroup::~GpuMemoryTrackingGroup() { 22 GpuMemoryTrackingGroup::~GpuMemoryTrackingGroup() {
25 memory_manager_->OnDestroyTrackingGroup(this); 23 memory_manager_->OnDestroyTrackingGroup(this);
26 } 24 }
27 25
28 void GpuMemoryTrackingGroup::TrackMemoryAllocatedChange( 26 void GpuMemoryTrackingGroup::TrackMemoryAllocatedChange(
29 size_t old_size, 27 size_t old_size,
30 size_t new_size, 28 size_t new_size,
31 gpu::gles2::MemoryTracker::Pool tracking_pool) { 29 gpu::gles2::MemoryTracker::Pool tracking_pool) {
32 memory_manager_->TrackMemoryAllocatedChange( 30 memory_manager_->TrackMemoryAllocatedChange(
33 this, old_size, new_size, tracking_pool); 31 this, old_size, new_size, tracking_pool);
34 } 32 }
35 33
36 } // namespace content 34 } // namespace content
37
38 #endif
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_memory_tracking.h ('k') | content/common/gpu/image_transport_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698