OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_FACTORY_H_ |
| 6 #define CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_FACTORY_H_ |
| 7 |
| 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/shared_memory.h" |
| 11 #include "base/single_thread_task_runner.h" |
| 12 #include "content/common/content_export.h" |
| 13 #include "content/common/gpu/gpu_result_codes.h" |
| 14 |
| 15 namespace content { |
| 16 |
| 17 struct GpuCreateCommandBufferConfig; |
| 18 |
| 19 class CONTENT_EXPORT GpuChannelHostFactory { |
| 20 public: |
| 21 virtual ~GpuChannelHostFactory() {} |
| 22 |
| 23 virtual bool IsMainThread() = 0; |
| 24 virtual scoped_refptr<base::SingleThreadTaskRunner> |
| 25 GetIOThreadTaskRunner() = 0; |
| 26 virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) = 0; |
| 27 virtual CreateCommandBufferResult CreateViewCommandBuffer( |
| 28 int32_t surface_id, |
| 29 const GpuCreateCommandBufferConfig& init_params, |
| 30 int32_t route_id) = 0; |
| 31 }; |
| 32 |
| 33 } // namespace content |
| 34 |
| 35 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_FACTORY_H_ |
OLD | NEW |