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 | |
37 virtual void SuggestHaveFrontBuffer(bool suggest_have_frontbuffer) = 0; | 33 virtual void SuggestHaveFrontBuffer(bool suggest_have_frontbuffer) = 0; |
38 | 34 |
39 // Returns in bytes the total amount of GPU memory for the GPU which this | 35 // Returns in bytes the total amount of GPU memory for the GPU which this |
40 // context is currently rendering on. Returns false if no extension exists | 36 // context is currently rendering on. Returns false if no extension exists |
41 // to get the exact amount of GPU memory. | 37 // to get the exact amount of GPU memory. |
42 virtual bool GetTotalGpuMemory(uint64* bytes) = 0; | 38 virtual bool GetTotalGpuMemory(uint64* bytes) = 0; |
43 }; | 39 }; |
44 | 40 |
45 // The state associated with a GPU memory manager client. This acts as the | 41 // The state associated with a GPU memory manager client. This acts as the |
46 // handle through which the client interacts with the GPU memory manager. | 42 // handle through which the client interacts with the GPU memory manager. |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 bool list_iterator_valid_; | 77 bool list_iterator_valid_; |
82 | 78 |
83 // Set to disable allocating a frontbuffer or to disable allocations | 79 // Set to disable allocating a frontbuffer or to disable allocations |
84 // for clients that don't have surfaces. | 80 // for clients that don't have surfaces. |
85 bool hibernated_; | 81 bool hibernated_; |
86 }; | 82 }; |
87 | 83 |
88 } // namespace content | 84 } // namespace content |
89 | 85 |
90 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_CLIENT_H_ | 86 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_CLIENT_H_ |
OLD | NEW |