diff options
author | ccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-31 21:31:48 +0000 |
---|---|---|
committer | ccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-31 21:31:48 +0000 |
commit | 677cf5ffcfaca3eeb11e96c339a9dfb1c29df57c (patch) | |
tree | 9b7eccbe112999631d0bf712c7b89d96e1893565 /content/common/gpu/gpu_memory_tracking.h | |
parent | 06df751563caad85fb5e4f0b42499851a43808c8 (diff) | |
download | chromium_src-677cf5ffcfaca3eeb11e96c339a9dfb1c29df57c.zip chromium_src-677cf5ffcfaca3eeb11e96c339a9dfb1c29df57c.tar.gz chromium_src-677cf5ffcfaca3eeb11e96c339a9dfb1c29df57c.tar.bz2 |
Use uint64 instead of size_t in GpuMemoryManager
There are two reasons for this. Most pressing is that this is skating
near the edge of overflow (especially where we multiply things by 9/8).
Second is that it is indeed possible to have a Gpu with more than 4GB
of VRAM accessible even to a 32-bit process.
BUG=168413
Review URL: https://chromiumcodereview.appspot.com/12091051
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179966 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/gpu/gpu_memory_tracking.h')
-rw-r--r-- | content/common/gpu/gpu_memory_tracking.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/content/common/gpu/gpu_memory_tracking.h b/content/common/gpu/gpu_memory_tracking.h index c111d31..b27b605 100644 --- a/content/common/gpu/gpu_memory_tracking.h +++ b/content/common/gpu/gpu_memory_tracking.h @@ -20,14 +20,14 @@ class CONTENT_EXPORT GpuMemoryTrackingGroup { public: ~GpuMemoryTrackingGroup(); void TrackMemoryAllocatedChange( - size_t old_size, - size_t new_size, + uint64 old_size, + uint64 new_size, gpu::gles2::MemoryTracker::Pool tracking_pool); - bool EnsureGPUMemoryAvailable(size_t size_needed); + bool EnsureGPUMemoryAvailable(uint64 size_needed); base::ProcessId GetPid() const { return pid_; } - size_t GetSize() const { + uint64 GetSize() const { return size_; } gpu::gles2::MemoryTracker* GetMemoryTracker() const { @@ -42,7 +42,7 @@ class CONTENT_EXPORT GpuMemoryTrackingGroup { GpuMemoryManager* memory_manager); base::ProcessId pid_; - size_t size_; + uint64 size_; // Set and used only during the Manage function, to determine which // non-surface clients should be hibernated. |