OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #if defined(ENABLE_GPU) | 9 #if defined(ENABLE_GPU) |
10 | 10 |
11 #include <queue> | 11 #include <queue> |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
16 #include "base/process.h" | 16 #include "base/process.h" |
17 #include "base/task.h" | 17 #include "base/task.h" |
18 #include "content/common/gpu/media/gpu_video_decode_accelerator.h" | 18 #include "content/common/gpu/media/gpu_video_decode_accelerator.h" |
19 #include "gpu/command_buffer/common/constants.h" | |
20 #include "gpu/command_buffer/service/command_buffer_service.h" | 19 #include "gpu/command_buffer/service/command_buffer_service.h" |
21 #include "gpu/command_buffer/service/gpu_scheduler.h" | 20 #include "gpu/command_buffer/service/gpu_scheduler.h" |
22 #include "ipc/ipc_channel.h" | 21 #include "ipc/ipc_channel.h" |
23 #include "ipc/ipc_message.h" | 22 #include "ipc/ipc_message.h" |
24 #include "ui/gfx/native_widget_types.h" | 23 #include "ui/gfx/native_widget_types.h" |
25 #include "ui/gfx/size.h" | 24 #include "ui/gfx/size.h" |
26 | 25 |
27 class GpuChannel; | 26 class GpuChannel; |
28 class GpuWatchdog; | 27 class GpuWatchdog; |
29 | 28 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 #endif // defined(OS_MACOSX) | 84 #endif // defined(OS_MACOSX) |
86 | 85 |
87 private: | 86 private: |
88 // Cleans up and sends reply if OnInitialize failed. | 87 // Cleans up and sends reply if OnInitialize failed. |
89 void OnInitializeFailed(IPC::Message* reply_message); | 88 void OnInitializeFailed(IPC::Message* reply_message); |
90 | 89 |
91 // Message handlers: | 90 // Message handlers: |
92 void OnInitialize(base::SharedMemoryHandle ring_buffer, | 91 void OnInitialize(base::SharedMemoryHandle ring_buffer, |
93 int32 size, | 92 int32 size, |
94 IPC::Message* reply_message); | 93 IPC::Message* reply_message); |
95 void OnMapExternalResource(gpu::resource_type::ResourceType resource_type, | |
96 uint32 resource_source_id, | |
97 int32 source_route_id, | |
98 uint32 resource_dest_id); | |
99 void OnSetParent(int32 parent_route_id, | 94 void OnSetParent(int32 parent_route_id, |
100 uint32 parent_texture_id, | 95 uint32 parent_texture_id, |
101 IPC::Message* reply_message); | 96 IPC::Message* reply_message); |
102 void OnGetState(IPC::Message* reply_message); | 97 void OnGetState(IPC::Message* reply_message); |
103 void OnFlush(int32 put_offset, | 98 void OnFlush(int32 put_offset, |
104 int32 last_known_get, | 99 int32 last_known_get, |
105 uint32 flush_count, | 100 uint32 flush_count, |
106 IPC::Message* reply_message); | 101 IPC::Message* reply_message); |
107 void OnAsyncFlush(int32 put_offset, uint32 flush_count); | 102 void OnAsyncFlush(int32 put_offset, uint32 flush_count); |
108 void OnRescheduled(); | 103 void OnRescheduled(); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 | 160 |
166 // The video decoder associated with this stub, if any. | 161 // The video decoder associated with this stub, if any. |
167 scoped_ptr<GpuVideoDecodeAccelerator> video_decoder_; | 162 scoped_ptr<GpuVideoDecodeAccelerator> video_decoder_; |
168 | 163 |
169 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); | 164 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); |
170 }; | 165 }; |
171 | 166 |
172 #endif // defined(ENABLE_GPU) | 167 #endif // defined(ENABLE_GPU) |
173 | 168 |
174 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 169 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
OLD | NEW |