| 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_CLIENT_GPU_CHANNEL_HOST_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ |
| 6 #define CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) = 0; | 69 virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) = 0; |
| 70 virtual CreateCommandBufferResult CreateViewCommandBuffer( | 70 virtual CreateCommandBufferResult CreateViewCommandBuffer( |
| 71 int32 surface_id, | 71 int32 surface_id, |
| 72 const GPUCreateCommandBufferConfig& init_params, | 72 const GPUCreateCommandBufferConfig& init_params, |
| 73 int32 route_id) = 0; | 73 int32 route_id) = 0; |
| 74 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( | 74 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( |
| 75 size_t width, | 75 size_t width, |
| 76 size_t height, | 76 size_t height, |
| 77 unsigned internalformat, | 77 unsigned internalformat, |
| 78 unsigned usage) = 0; | 78 unsigned usage) = 0; |
| 79 virtual void DeleteGpuMemoryBuffer( | |
| 80 scoped_ptr<gfx::GpuMemoryBuffer> buffer) = 0; | |
| 81 }; | 79 }; |
| 82 | 80 |
| 83 // Encapsulates an IPC channel between the client and one GPU process. | 81 // Encapsulates an IPC channel between the client and one GPU process. |
| 84 // On the GPU process side there's a corresponding GpuChannel. | 82 // On the GPU process side there's a corresponding GpuChannel. |
| 85 // Every method can be called on any thread with a message loop, except for the | 83 // Every method can be called on any thread with a message loop, except for the |
| 86 // IO thread. | 84 // IO thread. |
| 87 class GpuChannelHost : public IPC::Sender, | 85 class GpuChannelHost : public IPC::Sender, |
| 88 public base::RefCountedThreadSafe<GpuChannelHost> { | 86 public base::RefCountedThreadSafe<GpuChannelHost> { |
| 89 public: | 87 public: |
| 90 // Must be called on the main thread (as defined by the factory). | 88 // Must be called on the main thread (as defined by the factory). |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 // Used to look up a proxy from its routing id. | 238 // Used to look up a proxy from its routing id. |
| 241 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap; | 239 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap; |
| 242 ProxyMap proxies_; | 240 ProxyMap proxies_; |
| 243 | 241 |
| 244 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); | 242 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); |
| 245 }; | 243 }; |
| 246 | 244 |
| 247 } // namespace content | 245 } // namespace content |
| 248 | 246 |
| 249 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ | 247 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ |
| OLD | NEW |