OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_ |
6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_ |
7 | 7 |
8 #include "app/gfx/native_widget_types.h" | 8 #include "app/gfx/native_widget_types.h" |
9 #include "base/ref_counted.h" | 9 #include "base/ref_counted.h" |
10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 | 34 |
35 virtual ~GPUProcessor(); | 35 virtual ~GPUProcessor(); |
36 | 36 |
37 virtual void Destroy(); | 37 virtual void Destroy(); |
38 | 38 |
39 virtual void ProcessCommands(); | 39 virtual void ProcessCommands(); |
40 | 40 |
41 // Implementation of CommandBufferEngine. | 41 // Implementation of CommandBufferEngine. |
42 virtual Buffer GetSharedMemoryBuffer(int32 shm_id); | 42 virtual Buffer GetSharedMemoryBuffer(int32 shm_id); |
43 virtual void set_token(int32 token); | 43 virtual void set_token(int32 token); |
| 44 virtual bool SetGetOffset(int32 offset); |
| 45 virtual int32 GetGetOffset(); |
44 | 46 |
45 private: | 47 private: |
46 // The GPUProcessor holds a weak reference to the CommandBuffer. The | 48 // The GPUProcessor holds a weak reference to the CommandBuffer. The |
47 // CommandBuffer owns the GPUProcessor and holds a strong reference to it | 49 // CommandBuffer owns the GPUProcessor and holds a strong reference to it |
48 // through the ProcessCommands callback. | 50 // through the ProcessCommands callback. |
49 CommandBuffer* command_buffer_; | 51 CommandBuffer* command_buffer_; |
50 | 52 |
51 scoped_ptr< ::base::SharedMemory> mapped_ring_buffer_; | 53 scoped_ptr< ::base::SharedMemory> mapped_ring_buffer_; |
52 int commands_per_update_; | 54 int commands_per_update_; |
53 | 55 |
(...skipping 20 matching lines...) Expand all Loading... |
74 | 76 |
75 protected: | 77 protected: |
76 gpu::GPUProcessor* obj_; | 78 gpu::GPUProcessor* obj_; |
77 Method meth_; | 79 Method meth_; |
78 | 80 |
79 private: | 81 private: |
80 DISALLOW_COPY_AND_ASSIGN(CallbackStorage); | 82 DISALLOW_COPY_AND_ASSIGN(CallbackStorage); |
81 }; | 83 }; |
82 | 84 |
83 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_ | 85 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_PROCESSOR_H_ |
OLD | NEW |