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

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

Issue 6557006: Moved creation of GPU transfer buffers into the browser process.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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
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/common/gpu_messages.h" 5 #include "chrome/common/gpu_messages.h"
6 #include "chrome/gpu/gpu_channel.h" 6 #include "chrome/gpu/gpu_channel.h"
7 #include "chrome/gpu/gpu_video_decoder.h" 7 #include "chrome/gpu/gpu_video_decoder.h"
8 #include "chrome/gpu/gpu_video_service.h" 8 #include "chrome/gpu/gpu_video_service.h"
9 9
10 struct GpuVideoService::GpuVideoDecoderInfo { 10 struct GpuVideoService::GpuVideoDecoderInfo {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 bool GpuVideoService::CreateVideoDecoder( 56 bool GpuVideoService::CreateVideoDecoder(
57 GpuChannel* channel, 57 GpuChannel* channel,
58 MessageRouter* router, 58 MessageRouter* router,
59 int32 decoder_host_id, 59 int32 decoder_host_id,
60 int32 decoder_id, 60 int32 decoder_id,
61 gpu::gles2::GLES2Decoder* gles2_decoder) { 61 gpu::gles2::GLES2Decoder* gles2_decoder) {
62 GpuVideoDecoderInfo decoder_info; 62 GpuVideoDecoderInfo decoder_info;
63 decoder_info.decoder = new GpuVideoDecoder(MessageLoop::current(), 63 decoder_info.decoder = new GpuVideoDecoder(MessageLoop::current(),
64 decoder_host_id, 64 decoder_host_id,
65 channel, 65 channel,
66 channel->renderer_handle(), 66 channel->renderer_process(),
67 gles2_decoder); 67 gles2_decoder);
68 decoder_info.channel = channel; 68 decoder_info.channel = channel;
69 decoder_map_[decoder_id] = decoder_info; 69 decoder_map_[decoder_id] = decoder_info;
70 router->AddRoute(decoder_id, decoder_info.decoder); 70 router->AddRoute(decoder_id, decoder_info.decoder);
71 71
72 channel->Send(new GpuVideoDecoderHostMsg_CreateVideoDecoderDone( 72 channel->Send(new GpuVideoDecoderHostMsg_CreateVideoDecoderDone(
73 decoder_host_id, decoder_id)); 73 decoder_host_id, decoder_id));
74 return true; 74 return true;
75 } 75 }
76 76
77 void GpuVideoService::DestroyVideoDecoder( 77 void GpuVideoService::DestroyVideoDecoder(
78 MessageRouter* router, 78 MessageRouter* router,
79 int32 decoder_id) { 79 int32 decoder_id) {
80 router->RemoveRoute(decoder_id); 80 router->RemoveRoute(decoder_id);
81 decoder_map_.erase(decoder_id); 81 decoder_map_.erase(decoder_id);
82 } 82 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698