| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 5 #ifndef CHROME_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
| 6 #define CHROME_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 6 #define CHROME_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #if defined(ENABLE_GPU) | 9 #if defined(ENABLE_GPU) |
| 10 | 10 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 virtual void OnMessageReceived(const IPC::Message& message); | 44 virtual void OnMessageReceived(const IPC::Message& message); |
| 45 | 45 |
| 46 // IPC::Message::Sender implementation: | 46 // IPC::Message::Sender implementation: |
| 47 virtual bool Send(IPC::Message* msg); | 47 virtual bool Send(IPC::Message* msg); |
| 48 | 48 |
| 49 // Get the GLContext associated with this object. | 49 // Get the GLContext associated with this object. |
| 50 gpu::GPUProcessor* processor() const { return processor_.get(); } | 50 gpu::GPUProcessor* processor() const { return processor_.get(); } |
| 51 | 51 |
| 52 int32 route_id() const { return route_id_; } | 52 int32 route_id() const { return route_id_; } |
| 53 | 53 |
| 54 #if defined(OS_MACOSX) |
| 55 // Called only by the GpuChannel. |
| 56 void AcceleratedSurfaceBuffersSwapped(uint64 swap_buffers_count); |
| 57 #endif |
| 58 |
| 54 private: | 59 private: |
| 55 // Message handlers: | 60 // Message handlers: |
| 56 void OnInitialize(int32 size, base::SharedMemoryHandle* ring_buffer); | 61 void OnInitialize(int32 size, base::SharedMemoryHandle* ring_buffer); |
| 57 void OnGetState(gpu::CommandBuffer::State* state); | 62 void OnGetState(gpu::CommandBuffer::State* state); |
| 58 void OnAsyncGetState(); | 63 void OnAsyncGetState(); |
| 59 void OnFlush(int32 put_offset, gpu::CommandBuffer::State* state); | 64 void OnFlush(int32 put_offset, gpu::CommandBuffer::State* state); |
| 60 void OnAsyncFlush(int32 put_offset); | 65 void OnAsyncFlush(int32 put_offset); |
| 61 void OnCreateTransferBuffer(int32 size, int32* id); | 66 void OnCreateTransferBuffer(int32 size, int32* id); |
| 62 void OnDestroyTransferBuffer(int32 id); | 67 void OnDestroyTransferBuffer(int32 id); |
| 63 void OnGetTransferBuffer(int32 id, | 68 void OnGetTransferBuffer(int32 id, |
| (...skipping 28 matching lines...) Expand all Loading... |
| 92 | 97 |
| 93 scoped_ptr<gpu::CommandBufferService> command_buffer_; | 98 scoped_ptr<gpu::CommandBufferService> command_buffer_; |
| 94 scoped_ptr<gpu::GPUProcessor> processor_; | 99 scoped_ptr<gpu::GPUProcessor> processor_; |
| 95 | 100 |
| 96 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); | 101 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); |
| 97 }; | 102 }; |
| 98 | 103 |
| 99 #endif // ENABLE_GPU | 104 #endif // ENABLE_GPU |
| 100 | 105 |
| 101 #endif // CHROME_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 106 #endif // CHROME_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
| OLD | NEW |