Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1322)

Side by Side Diff: content/common/gpu/gpu_command_buffer_stub.h

Issue 7292010: Delete GpuVideoService and move GpuVideoDecodeAccelerator ownership to stubs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase ToT Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/common/gpu/gpu_channel.cc ('k') | content/common/gpu/gpu_command_buffer_stub.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "gpu/command_buffer/service/command_buffer_service.h" 19 #include "gpu/command_buffer/service/command_buffer_service.h"
19 #include "gpu/command_buffer/service/gpu_scheduler.h" 20 #include "gpu/command_buffer/service/gpu_scheduler.h"
20 #include "ipc/ipc_channel.h" 21 #include "ipc/ipc_channel.h"
21 #include "ipc/ipc_message.h" 22 #include "ipc/ipc_message.h"
22 #include "ui/gfx/native_widget_types.h" 23 #include "ui/gfx/native_widget_types.h"
23 #include "ui/gfx/size.h" 24 #include "ui/gfx/size.h"
24 25
25 class GpuChannel; 26 class GpuChannel;
26 class GpuWatchdog; 27 class GpuWatchdog;
27 28
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 int32 id_request, 114 int32 id_request,
114 IPC::Message* reply_message); 115 IPC::Message* reply_message);
115 void OnRegisterTransferBuffer(base::SharedMemoryHandle transfer_buffer, 116 void OnRegisterTransferBuffer(base::SharedMemoryHandle transfer_buffer,
116 size_t size, 117 size_t size,
117 int32 id_request, 118 int32 id_request,
118 IPC::Message* reply_message); 119 IPC::Message* reply_message);
119 void OnDestroyTransferBuffer(int32 id, IPC::Message* reply_message); 120 void OnDestroyTransferBuffer(int32 id, IPC::Message* reply_message);
120 void OnGetTransferBuffer(int32 id, IPC::Message* reply_message); 121 void OnGetTransferBuffer(int32 id, IPC::Message* reply_message);
121 void OnResizeOffscreenFrameBuffer(const gfx::Size& size); 122 void OnResizeOffscreenFrameBuffer(const gfx::Size& size);
122 123
124 void OnCreateVideoDecoder(int32 decoder_host_id,
125 const std::vector<uint32>& configs);
126 void OnDestroyVideoDecoder();
127
123 void OnSwapBuffers(); 128 void OnSwapBuffers();
124 void OnCommandProcessed(); 129 void OnCommandProcessed();
125 void HandleDeferredMessages(); 130 void HandleDeferredMessages();
126 void OnScheduled(); 131 void OnScheduled();
127 void OnParseError(); 132 void OnParseError();
128 133
129 #if defined(OS_MACOSX) 134 #if defined(OS_MACOSX)
130 void OnSetWindowSize(const gfx::Size& size); 135 void OnSetWindowSize(const gfx::Size& size);
131 #endif // defined(OS_MACOSX) 136 #endif // defined(OS_MACOSX)
132 137
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 std::vector<base::Callback<void(int32)> > set_token_callbacks_; 169 std::vector<base::Callback<void(int32)> > set_token_callbacks_;
165 170
166 // SetParent may be called before Initialize, in which case we need to keep 171 // SetParent may be called before Initialize, in which case we need to keep
167 // around the parent stub, so that Initialize can set the parent correctly. 172 // around the parent stub, so that Initialize can set the parent correctly.
168 base::WeakPtr<GpuCommandBufferStub> parent_stub_for_initialization_; 173 base::WeakPtr<GpuCommandBufferStub> parent_stub_for_initialization_;
169 uint32 parent_texture_for_initialization_; 174 uint32 parent_texture_for_initialization_;
170 175
171 GpuWatchdog* watchdog_; 176 GpuWatchdog* watchdog_;
172 ScopedRunnableMethodFactory<GpuCommandBufferStub> task_factory_; 177 ScopedRunnableMethodFactory<GpuCommandBufferStub> task_factory_;
173 178
179 // The video decoder associated with this stub, if any.
180 scoped_ptr<GpuVideoDecodeAccelerator> video_decoder_;
181
174 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); 182 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub);
175 }; 183 };
176 184
177 #endif // defined(ENABLE_GPU) 185 #endif // defined(ENABLE_GPU)
178 186
179 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ 187 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel.cc ('k') | content/common/gpu/gpu_command_buffer_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698