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

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

Issue 1845563005: Refactor content/common/gpu into gpu/ipc/service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Drop ref to deleted content_tests_gypi_values.content_unittests_ozone_sources 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
« no previous file with comments | « content/common/gpu/gpu_memory_tracking.h ('k') | content/common/gpu/gpu_watchdog.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "content/common/gpu/gpu_memory_tracking.h"
6
7 #include "content/common/gpu/gpu_memory_manager.h"
8
9 namespace content {
10
11 GpuMemoryTrackingGroup::GpuMemoryTrackingGroup(
12 base::ProcessId pid,
13 gpu::gles2::MemoryTracker* memory_tracker,
14 GpuMemoryManager* memory_manager)
15 : pid_(pid),
16 size_(0),
17 hibernated_(false),
18 memory_tracker_(memory_tracker),
19 memory_manager_(memory_manager) {
20 }
21
22 GpuMemoryTrackingGroup::~GpuMemoryTrackingGroup() {
23 memory_manager_->OnDestroyTrackingGroup(this);
24 }
25
26 void GpuMemoryTrackingGroup::TrackMemoryAllocatedChange(uint64_t old_size,
27 uint64_t new_size) {
28 memory_manager_->TrackMemoryAllocatedChange(
29 this, old_size, new_size);
30 }
31
32 bool GpuMemoryTrackingGroup::EnsureGPUMemoryAvailable(uint64_t size_needed) {
33 return memory_manager_->EnsureGPUMemoryAvailable(size_needed);
34 }
35
36
37 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_memory_tracking.h ('k') | content/common/gpu/gpu_watchdog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698