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

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

Issue 10274007: Revert 134480 - Revert 134428 - GpuMemoryManager suggests values for renderer Contents Texture Mana… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 | « content/common/gpu/gpu_command_buffer_stub.cc ('k') | 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
===================================================================
--- content/common/gpu/gpu_memory_allocation.h (revision 134525)
+++ content/common/gpu/gpu_memory_allocation.h (working copy)
@@ -12,7 +12,6 @@
// and assigned to the browser and renderer context.
// They will change over time, given memory availability, and browser state.
-
// Memory Allocation which will be assigned to the renderer context.
struct GpuMemoryAllocationForRenderer {
enum {
@@ -68,17 +67,24 @@
// GpuMemoryManager.
struct GpuMemoryAllocation : public GpuMemoryAllocationForRenderer,
public GpuMemoryAllocationForBrowser {
+ // Bitmap
+ enum BufferAllocation {
+ kHasNoBuffers = 0,
+ kHasFrontbuffer = 1,
+ kHasBackbuffer = 2
+ };
+
GpuMemoryAllocation()
: GpuMemoryAllocationForRenderer(),
GpuMemoryAllocationForBrowser() {
}
GpuMemoryAllocation(size_t gpu_resource_size_in_bytes,
- bool suggest_have_backbuffer,
- bool suggest_have_frontbuffer)
+ int allocationBitmap)
: GpuMemoryAllocationForRenderer(gpu_resource_size_in_bytes,
- suggest_have_backbuffer),
- GpuMemoryAllocationForBrowser(suggest_have_frontbuffer) {
+ (allocationBitmap & kHasBackbuffer) == kHasBackbuffer),
+ GpuMemoryAllocationForBrowser(
+ (allocationBitmap & kHasFrontbuffer) == kHasFrontbuffer) {
}
bool operator==(const GpuMemoryAllocation& other) const {
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.cc ('k') | content/common/gpu/gpu_memory_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698