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

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

Issue 313163002: Revert 274326 "Lobotomize the GPU memory manager" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 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
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),
24 bytes_nicetohave_limit_low_(0),
25 bytes_nicetohave_limit_high_(0),
26 bytes_allocation_when_visible_(0),
27 bytes_allocation_ideal_nicetohave_(0),
28 bytes_allocation_ideal_required_(0),
29 bytes_allocation_ideal_minimum_(0),
23 hibernated_(false) { 30 hibernated_(false) {
24 } 31 }
25 32
26 GpuMemoryManagerClientState::~GpuMemoryManagerClientState() { 33 GpuMemoryManagerClientState::~GpuMemoryManagerClientState() {
27 memory_manager_->OnDestroyClientState(this); 34 memory_manager_->OnDestroyClientState(this);
28 } 35 }
29 36
30 void GpuMemoryManagerClientState::SetVisible(bool visible) { 37 void GpuMemoryManagerClientState::SetVisible(bool visible) {
31 memory_manager_->SetClientStateVisible(this, visible); 38 memory_manager_->SetClientStateVisible(this, visible);
32 } 39 }
33 40
34 void GpuMemoryManagerClientState::SetManagedMemoryStats( 41 void GpuMemoryManagerClientState::SetManagedMemoryStats(
35 const gpu::ManagedMemoryStats& stats) { 42 const gpu::ManagedMemoryStats& stats) {
36 memory_manager_->SetClientStateManagedMemoryStats(this, stats); 43 memory_manager_->SetClientStateManagedMemoryStats(this, stats);
37 } 44 }
38 45
39 } // namespace content 46 } // namespace content
OLDNEW
« no previous file with comments | « trunk/src/content/common/gpu/gpu_memory_manager_client.h ('k') | trunk/src/content/common/gpu/gpu_memory_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698