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

Unified Diff: content/common/gpu/gpu_memory_allocation.h

Issue 10801014: Add GetStubStats and related functions in GpuMemoryManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removing hash specialization on win. Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/common/gpu/gpu_memory_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_memory_allocation.h
diff --git a/content/common/gpu/gpu_memory_allocation.h b/content/common/gpu/gpu_memory_allocation.h
index acfef89ea140a8434f57249cd65bda5703e65d4a..fcf31e76f30585316d1c8411eb9187509ba4b725 100644
--- a/content/common/gpu/gpu_memory_allocation.h
+++ b/content/common/gpu/gpu_memory_allocation.h
@@ -97,4 +97,29 @@ struct GpuMemoryAllocation : public GpuMemoryAllocationForRenderer,
}
};
+// Memory Allocation request which is sent by a client, to help GpuMemoryManager
+// more ideally split memory allocations across clients.
+struct GpuMemoryAllocationRequest {
+ size_t min_allocation_bytes;
+ size_t ideal_allocation_bytes;
+
+ GpuMemoryAllocationRequest()
+ : min_allocation_bytes(0),
+ ideal_allocation_bytes(0) {
+ }
+
+ GpuMemoryAllocationRequest(size_t min_bytes, size_t ideal_bytes)
+ : min_allocation_bytes(min_bytes),
+ ideal_allocation_bytes(ideal_bytes) {
+ }
+
+ bool operator==(const GpuMemoryAllocationRequest& other) const {
+ return min_allocation_bytes == other.min_allocation_bytes &&
+ ideal_allocation_bytes == other.ideal_allocation_bytes;
+ }
+ bool operator!=(const GpuMemoryAllocationRequest& other) const {
+ return !(*this == other);
+ }
+};
+
#endif // CONTENT_COMMON_GPU_GPU_MEMORY_ALLOCATION_H_
« no previous file with comments | « no previous file | content/common/gpu/gpu_memory_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698