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

Side by Side Diff: gpu/ipc/service/gpu_memory_tracking.cc

Issue 1875463002: Remove unused fields from //content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scythe-root
Patch Set: Fixed Ozone build. Created 4 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
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 "gpu/ipc/service/gpu_memory_tracking.h" 5 #include "gpu/ipc/service/gpu_memory_tracking.h"
6 6
7 #include "gpu/ipc/service/gpu_memory_manager.h" 7 #include "gpu/ipc/service/gpu_memory_manager.h"
8 8
9 namespace gpu { 9 namespace gpu {
10 10
11 GpuMemoryTrackingGroup::GpuMemoryTrackingGroup( 11 GpuMemoryTrackingGroup::GpuMemoryTrackingGroup(
12 base::ProcessId pid, 12 base::ProcessId pid,
13 gles2::MemoryTracker* memory_tracker, 13 gles2::MemoryTracker* memory_tracker,
14 GpuMemoryManager* memory_manager) 14 GpuMemoryManager* memory_manager)
15 : pid_(pid), 15 : pid_(pid),
16 size_(0), 16 size_(0),
17 hibernated_(false),
18 memory_tracker_(memory_tracker), 17 memory_tracker_(memory_tracker),
19 memory_manager_(memory_manager) { 18 memory_manager_(memory_manager) {
20 } 19 }
21 20
22 GpuMemoryTrackingGroup::~GpuMemoryTrackingGroup() { 21 GpuMemoryTrackingGroup::~GpuMemoryTrackingGroup() {
23 memory_manager_->OnDestroyTrackingGroup(this); 22 memory_manager_->OnDestroyTrackingGroup(this);
24 } 23 }
25 24
26 void GpuMemoryTrackingGroup::TrackMemoryAllocatedChange(uint64_t old_size, 25 void GpuMemoryTrackingGroup::TrackMemoryAllocatedChange(uint64_t old_size,
27 uint64_t new_size) { 26 uint64_t new_size) {
28 memory_manager_->TrackMemoryAllocatedChange( 27 memory_manager_->TrackMemoryAllocatedChange(
29 this, old_size, new_size); 28 this, old_size, new_size);
30 } 29 }
31 30
32 bool GpuMemoryTrackingGroup::EnsureGPUMemoryAvailable(uint64_t size_needed) { 31 bool GpuMemoryTrackingGroup::EnsureGPUMemoryAvailable(uint64_t size_needed) {
33 return memory_manager_->EnsureGPUMemoryAvailable(size_needed); 32 return memory_manager_->EnsureGPUMemoryAvailable(size_needed);
34 } 33 }
35 34
36 35
37 } // namespace gpu 36 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698