| 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_COMMAND_BUFFER_STUB_H_ | 5 #ifndef CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
| 6 #define CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 6 #define CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 | 123 |
| 124 void AddDestructionObserver(DestructionObserver* observer); | 124 void AddDestructionObserver(DestructionObserver* observer); |
| 125 void RemoveDestructionObserver(DestructionObserver* observer); | 125 void RemoveDestructionObserver(DestructionObserver* observer); |
| 126 | 126 |
| 127 // Associates a sync point to this stub. When the stub is destroyed, it will | 127 // Associates a sync point to this stub. When the stub is destroyed, it will |
| 128 // retire all sync points that haven't been previously retired. | 128 // retire all sync points that haven't been previously retired. |
| 129 void AddSyncPoint(uint32 sync_point); | 129 void AddSyncPoint(uint32 sync_point); |
| 130 | 130 |
| 131 void SetPreemptByFlag(scoped_refptr<gpu::PreemptionFlag> flag); | 131 void SetPreemptByFlag(scoped_refptr<gpu::PreemptionFlag> flag); |
| 132 | 132 |
| 133 void OnDestroySurface(int surface_id); |
| 134 |
| 133 private: | 135 private: |
| 134 GpuMemoryManager* GetMemoryManager(); | 136 GpuMemoryManager* GetMemoryManager(); |
| 135 bool MakeCurrent(); | 137 bool MakeCurrent(); |
| 136 void Destroy(); | 138 void Destroy(); |
| 137 | 139 |
| 138 // Cleans up and sends reply if OnInitialize failed. | 140 // Cleans up and sends reply if OnInitialize failed. |
| 139 void OnInitializeFailed(IPC::Message* reply_message); | 141 void OnInitializeFailed(IPC::Message* reply_message); |
| 140 | 142 |
| 141 // Message handlers: | 143 // Message handlers: |
| 142 void OnInitialize(base::SharedMemoryHandle shared_state_shm, | 144 void OnInitialize(base::SharedMemoryHandle shared_state_shm, |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 size_t active_url_hash_; | 250 size_t active_url_hash_; |
| 249 | 251 |
| 250 size_t total_gpu_memory_; | 252 size_t total_gpu_memory_; |
| 251 | 253 |
| 252 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); | 254 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); |
| 253 }; | 255 }; |
| 254 | 256 |
| 255 } // namespace content | 257 } // namespace content |
| 256 | 258 |
| 257 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 259 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
| OLD | NEW |