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

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

Issue 10910180: Give Chrome OS more GPU memory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove extra knob from ChromeOS Created 8 years, 3 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_manager.h ('k') | no next file » | 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_manager.h" 5 #include "content/common/gpu/gpu_memory_manager.h"
6 6
7 #if defined(ENABLE_GPU) 7 #if defined(ENABLE_GPU)
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 CommandLine* command_line = CommandLine::ForCurrentProcess(); 81 CommandLine* command_line = CommandLine::ForCurrentProcess();
82 if (command_line->HasSwitch(switches::kForceGpuMemAvailableMb)) { 82 if (command_line->HasSwitch(switches::kForceGpuMemAvailableMb)) {
83 base::StringToSizeT( 83 base::StringToSizeT(
84 command_line->GetSwitchValueASCII(switches::kForceGpuMemAvailableMb), 84 command_line->GetSwitchValueASCII(switches::kForceGpuMemAvailableMb),
85 &bytes_available_gpu_memory_); 85 &bytes_available_gpu_memory_);
86 bytes_available_gpu_memory_ *= 1024 * 1024; 86 bytes_available_gpu_memory_ *= 1024 * 1024;
87 } else { 87 } else {
88 #if defined(OS_ANDROID) 88 #if defined(OS_ANDROID)
89 bytes_available_gpu_memory_ = 64 * 1024 * 1024; 89 bytes_available_gpu_memory_ = 64 * 1024 * 1024;
90 #else 90 #else
91 #if defined(OS_CHROMEOS)
92 bytes_available_gpu_memory_ = 1024 * 1024 * 1024;
93 #else
91 bytes_available_gpu_memory_ = 256 * 1024 * 1024; 94 bytes_available_gpu_memory_ = 256 * 1024 * 1024;
92 #endif 95 #endif
96 #endif
93 } 97 }
94 } 98 }
95 99
96 GpuMemoryManager::~GpuMemoryManager() { 100 GpuMemoryManager::~GpuMemoryManager() {
97 DCHECK(tracking_groups_.empty()); 101 DCHECK(tracking_groups_.empty());
98 } 102 }
99 103
100 bool GpuMemoryManager::StubWithSurfaceComparator::operator()( 104 bool GpuMemoryManager::StubWithSurfaceComparator::operator()(
101 GpuCommandBufferStubBase* lhs, 105 GpuCommandBufferStubBase* lhs,
102 GpuCommandBufferStubBase* rhs) { 106 GpuCommandBufferStubBase* rhs) {
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 false); 339 false);
336 340
337 AssignMemoryAllocations( 341 AssignMemoryAllocations(
338 &stub_memory_stats_for_last_manage_, 342 &stub_memory_stats_for_last_manage_,
339 stubs_without_surface_hibernated, 343 stubs_without_surface_hibernated,
340 GpuMemoryAllocation(0, GpuMemoryAllocation::kHasNoBuffers), 344 GpuMemoryAllocation(0, GpuMemoryAllocation::kHasNoBuffers),
341 false); 345 false);
342 } 346 }
343 347
344 #endif 348 #endif
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_memory_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698