| OLD | NEW |
| 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 #ifndef CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_CLIENT_H_ | 5 #ifndef CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_CLIENT_H_ |
| 6 #define CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_CLIENT_H_ | 6 #define CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_CLIENT_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 class CONTENT_EXPORT GpuMemoryManagerClient { | 23 class CONTENT_EXPORT GpuMemoryManagerClient { |
| 24 public: | 24 public: |
| 25 virtual ~GpuMemoryManagerClient() {} | 25 virtual ~GpuMemoryManagerClient() {} |
| 26 | 26 |
| 27 // Returns surface size. | 27 // Returns surface size. |
| 28 virtual gfx::Size GetSurfaceSize() const = 0; | 28 virtual gfx::Size GetSurfaceSize() const = 0; |
| 29 | 29 |
| 30 // Returns the memory tracker for this stub. | 30 // Returns the memory tracker for this stub. |
| 31 virtual gpu::gles2::MemoryTracker* GetMemoryTracker() const = 0; | 31 virtual gpu::gles2::MemoryTracker* GetMemoryTracker() const = 0; |
| 32 | 32 |
| 33 // Sets buffer usage depending on Memory Allocation |
| 34 virtual void SetMemoryAllocation( |
| 35 const gpu::MemoryAllocation& allocation) = 0; |
| 36 |
| 33 virtual void SuggestHaveFrontBuffer(bool suggest_have_frontbuffer) = 0; | 37 virtual void SuggestHaveFrontBuffer(bool suggest_have_frontbuffer) = 0; |
| 34 | 38 |
| 35 // Returns in bytes the total amount of GPU memory for the GPU which this | 39 // Returns in bytes the total amount of GPU memory for the GPU which this |
| 36 // context is currently rendering on. Returns false if no extension exists | 40 // context is currently rendering on. Returns false if no extension exists |
| 37 // to get the exact amount of GPU memory. | 41 // to get the exact amount of GPU memory. |
| 38 virtual bool GetTotalGpuMemory(uint64* bytes) = 0; | 42 virtual bool GetTotalGpuMemory(uint64* bytes) = 0; |
| 39 }; | 43 }; |
| 40 | 44 |
| 41 // The state associated with a GPU memory manager client. This acts as the | 45 // The state associated with a GPU memory manager client. This acts as the |
| 42 // handle through which the client interacts with the GPU memory manager. | 46 // handle through which the client interacts with the GPU memory manager. |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 bool list_iterator_valid_; | 81 bool list_iterator_valid_; |
| 78 | 82 |
| 79 // Set to disable allocating a frontbuffer or to disable allocations | 83 // Set to disable allocating a frontbuffer or to disable allocations |
| 80 // for clients that don't have surfaces. | 84 // for clients that don't have surfaces. |
| 81 bool hibernated_; | 85 bool hibernated_; |
| 82 }; | 86 }; |
| 83 | 87 |
| 84 } // namespace content | 88 } // namespace content |
| 85 | 89 |
| 86 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_CLIENT_H_ | 90 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_CLIENT_H_ |
| OLD | NEW |