| 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
 | 
| new file mode 100644
 | 
| index 0000000000000000000000000000000000000000..c11fdd3ab4b6727305bc0bce829523309359cfc6
 | 
| --- /dev/null
 | 
| +++ b/content/common/gpu/gpu_memory_allocation.h
 | 
| @@ -0,0 +1,46 @@
 | 
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
 | 
| +// Use of this source code is governed by a BSD-style license that can be
 | 
| +// found in the LICENSE file.
 | 
| +
 | 
| +#ifndef CONTENT_COMMON_GPU_GPU_MEMORY_ALLOCATION_H_
 | 
| +#define CONTENT_COMMON_GPU_GPU_MEMORY_ALLOCATION_H_
 | 
| +#pragma once
 | 
| +
 | 
| +#include "base/basictypes.h"
 | 
| +
 | 
| +// These are memory allocation limits assigned to a context.
 | 
| +// They will change over time, given memory availability, browser state, and
 | 
| +// GpuIdealMemoryAllocation values (see below).
 | 
| +// Exceeding these limits for an unreasonable amount of time will cause kill.
 | 
| +struct GpuMemoryAllocation {
 | 
| +  static const int kResourceSizeForegroundTab = 100 * 1024 * 1024;
 | 
| +  static const int kResourceSizeBackgroundTab = 50 * 1024 * 1024;
 | 
| +  static const int kResourceSizeHibernatedTab = 0;
 | 
| +
 | 
| +  int gpuResourceSizeInBytes;
 | 
| +  bool hasFrontbuffer;
 | 
| +  bool hasBackbuffer;
 | 
| +
 | 
| +  GpuMemoryAllocation()
 | 
| +      : gpuResourceSizeInBytes(0)
 | 
| +      , hasFrontbuffer(false)
 | 
| +      , hasBackbuffer(false) {
 | 
| +  }
 | 
| +
 | 
| +  GpuMemoryAllocation(int gpuResourceSizeInBytes,
 | 
| +                      bool hasFrontbuffer,
 | 
| +                      bool hasBackbuffer)
 | 
| +      : gpuResourceSizeInBytes(gpuResourceSizeInBytes)
 | 
| +      , hasFrontbuffer(hasFrontbuffer)
 | 
| +      , hasBackbuffer(hasBackbuffer) {
 | 
| +  }
 | 
| +};
 | 
| +
 | 
| +// Contexts should give ideal memory allocation hints to the GpuMemoryManager
 | 
| +// so that it can make better decisions on how to split resources.
 | 
| +// If memory is constrained and/or this context has lower priority than others,
 | 
| +// these requests will be overruled (see actual allocation limits above).
 | 
| +struct GpuIdealMemoryAllocation {
 | 
| +};
 | 
| +
 | 
| +#endif // CONTENT_COMMON_GPU_GPU_MEMORY_ALLOCATION_H_
 | 
| 
 |