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

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

Issue 53633003: Do not give GPU memory to backgrounded compositors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove test Created 7 years, 1 month 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
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_manager_client.h" 5 #include "content/common/gpu/gpu_memory_manager_client.h"
6 6
7 #include "content/common/gpu/gpu_memory_manager.h" 7 #include "content/common/gpu/gpu_memory_manager.h"
8 8
9 namespace content { 9 namespace content {
10 10
11 GpuMemoryManagerClientState::GpuMemoryManagerClientState( 11 GpuMemoryManagerClientState::GpuMemoryManagerClientState(
12 GpuMemoryManager* memory_manager, 12 GpuMemoryManager* memory_manager,
13 GpuMemoryManagerClient* client, 13 GpuMemoryManagerClient* client,
14 GpuMemoryTrackingGroup* tracking_group, 14 GpuMemoryTrackingGroup* tracking_group,
15 bool has_surface, 15 bool has_surface,
16 bool visible) 16 bool visible)
17 : memory_manager_(memory_manager), 17 : memory_manager_(memory_manager),
18 client_(client), 18 client_(client),
19 tracking_group_(tracking_group), 19 tracking_group_(tracking_group),
20 has_surface_(has_surface), 20 has_surface_(has_surface),
21 visible_(visible), 21 visible_(visible),
22 list_iterator_valid_(false), 22 list_iterator_valid_(false),
23 managed_memory_stats_received_(false), 23 managed_memory_stats_received_(false),
24 bytes_nicetohave_limit_low_(0), 24 bytes_nicetohave_limit_low_(0),
25 bytes_nicetohave_limit_high_(0), 25 bytes_nicetohave_limit_high_(0),
26 bytes_allocation_when_visible_(0), 26 bytes_allocation_when_visible_(0),
27 bytes_allocation_when_nonvisible_(0),
28 bytes_allocation_ideal_nicetohave_(0), 27 bytes_allocation_ideal_nicetohave_(0),
29 bytes_allocation_ideal_required_(0), 28 bytes_allocation_ideal_required_(0),
30 bytes_allocation_ideal_minimum_(0), 29 bytes_allocation_ideal_minimum_(0),
31 hibernated_(false) { 30 hibernated_(false) {
32 } 31 }
33 32
34 GpuMemoryManagerClientState::~GpuMemoryManagerClientState() { 33 GpuMemoryManagerClientState::~GpuMemoryManagerClientState() {
35 memory_manager_->OnDestroyClientState(this); 34 memory_manager_->OnDestroyClientState(this);
36 } 35 }
37 36
38 void GpuMemoryManagerClientState::SetVisible(bool visible) { 37 void GpuMemoryManagerClientState::SetVisible(bool visible) {
39 memory_manager_->SetClientStateVisible(this, visible); 38 memory_manager_->SetClientStateVisible(this, visible);
40 } 39 }
41 40
42 void GpuMemoryManagerClientState::SetManagedMemoryStats( 41 void GpuMemoryManagerClientState::SetManagedMemoryStats(
43 const gpu::ManagedMemoryStats& stats) { 42 const gpu::ManagedMemoryStats& stats) {
44 memory_manager_->SetClientStateManagedMemoryStats(this, stats); 43 memory_manager_->SetClientStateManagedMemoryStats(this, stats);
45 } 44 }
46 45
47 } // namespace content 46 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_memory_manager_client.h ('k') | content/common/gpu/gpu_memory_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698