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

Side by Side Diff: chrome/gpu/gpu_channel.cc

Issue 3335014: Added FakeGlVideoDecodeEngine to exercise the IPC protocol for hardware video decoding (Closed)
Patch Set: compile man... Created 10 years, 3 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
OLDNEW
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 #include "chrome/gpu/gpu_channel.h" 5 #include "chrome/gpu/gpu_channel.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #endif 9 #endif
10 10
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 } 179 }
180 180
181 void GpuChannel::OnDestroyCommandBuffer(int32 route_id) { 181 void GpuChannel::OnDestroyCommandBuffer(int32 route_id) {
182 #if defined(ENABLE_GPU) 182 #if defined(ENABLE_GPU)
183 router_.RemoveRoute(route_id); 183 router_.RemoveRoute(route_id);
184 stubs_.Remove(route_id); 184 stubs_.Remove(route_id);
185 #endif 185 #endif
186 } 186 }
187 187
188 void GpuChannel::OnGetVideoService(GpuVideoServiceInfoParam* info) { 188 void GpuChannel::OnGetVideoService(GpuVideoServiceInfoParam* info) {
189 info->service_available_ = 0; 189 info->service_available = 0;
190 #if defined(ENABLE_GPU) 190 #if defined(ENABLE_GPU)
191 #if defined(OS_WIN)
192 // TODO(jiesun): Not every windows platforms will support our media
193 // foundation implementation. Add more check here.
194 LOG(INFO) << "GpuChannel::OnGetVideoService"; 191 LOG(INFO) << "GpuChannel::OnGetVideoService";
195 GpuVideoService* service = GpuVideoService::get(); 192 GpuVideoService* service = GpuVideoService::get();
196 if (service == NULL) 193 if (service == NULL)
197 return; 194 return;
198 195
199 info->video_service_host_route_id_ = GenerateRouteID(); 196 info->video_service_host_route_id = GenerateRouteID();
200 info->video_service_route_id_ = GenerateRouteID(); 197 info->video_service_route_id = GenerateRouteID();
201 // TODO(jiesun): we could had multiple entries in this routing table. 198 // TODO(jiesun): we could had multiple entries in this routing table.
202 router_.AddRoute(info->video_service_route_id_, service); 199 router_.AddRoute(info->video_service_route_id, service);
203 info->service_available_ = 1; 200 info->service_available = 1;
204 #endif
205 #endif 201 #endif
206 } 202 }
207 203
208 void GpuChannel::OnCreateVideoDecoder(GpuVideoDecoderInfoParam* info) { 204 void GpuChannel::OnCreateVideoDecoder(GpuVideoDecoderInfoParam* info) {
209 #if defined(ENABLE_GPU) 205 #if defined(ENABLE_GPU)
210 LOG(INFO) << "GpuChannel::OnCreateVideoDecoder"; 206 LOG(INFO) << "GpuChannel::OnCreateVideoDecoder";
211 info->decoder_id = -1; 207 info->decoder_id = -1;
212 GpuVideoService* service = GpuVideoService::get(); 208 GpuVideoService* service = GpuVideoService::get();
213 if (service == NULL) 209 if (service == NULL)
214 return; 210 return;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 channel_name, IPC::Channel::MODE_SERVER, this, NULL, 252 channel_name, IPC::Channel::MODE_SERVER, this, NULL,
257 ChildProcess::current()->io_message_loop(), false, 253 ChildProcess::current()->io_message_loop(), false,
258 ChildProcess::current()->GetShutDownEvent())); 254 ChildProcess::current()->GetShutDownEvent()));
259 255
260 return true; 256 return true;
261 } 257 }
262 258
263 std::string GpuChannel::GetChannelName() { 259 std::string GpuChannel::GetChannelName() {
264 return StringPrintf("%d.r%d", base::GetCurrentProcId(), renderer_id_); 260 return StringPrintf("%d.r%d", base::GetCurrentProcId(), renderer_id_);
265 } 261 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698