diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-03 18:57:24 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-03 18:57:24 +0000 |
commit | 1cfb7420fb7ea2fa5a6360bbee5424918e84a027 (patch) | |
tree | 6ca1fd441d8675a06370fc54ac06bcbeb099b5fa /chrome/common | |
parent | 6b723128f5c6b090b87949875dcc4e55304a4461 (diff) | |
download | chromium_src-1cfb7420fb7ea2fa5a6360bbee5424918e84a027.zip chromium_src-1cfb7420fb7ea2fa5a6360bbee5424918e84a027.tar.gz chromium_src-1cfb7420fb7ea2fa5a6360bbee5424918e84a027.tar.bz2 |
Complete initializing a GPU video decoder in a GLES2 context
In this patch a ggl::Context is connected to the GpuVideoDecoderHost in the
renderer process. In the GPU process the GpuVideoDecoder is connected to a
gles2::GLES2Decoder.
These changes will be used in the future to switch context before issuing
video decode commands. This is also needed by the GPU process to translate
a client texture ID to a service texture ID in the GPU video decoder.
BUG=53714
TEST=none
Review URL: http://codereview.chromium.org/3266008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58518 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/gpu_video_common.cc | 21 | ||||
-rw-r--r-- | chrome/common/gpu_video_common.h | 19 |
2 files changed, 23 insertions, 17 deletions
diff --git a/chrome/common/gpu_video_common.cc b/chrome/common/gpu_video_common.cc index 9732c33..2042c1b 100644 --- a/chrome/common/gpu_video_common.cc +++ b/chrome/common/gpu_video_common.cc @@ -34,16 +34,18 @@ void ParamTraits<GpuVideoServiceInfoParam>::Log( void ParamTraits<GpuVideoDecoderInfoParam>::Write( Message* m, const GpuVideoDecoderInfoParam& p) { - m->WriteInt(p.decoder_id_); - m->WriteInt(p.decoder_route_id_); - m->WriteInt(p.decoder_host_route_id_); + m->WriteInt(p.context_id); + m->WriteInt(p.decoder_id); + m->WriteInt(p.decoder_route_id); + m->WriteInt(p.decoder_host_route_id); } bool ParamTraits<GpuVideoDecoderInfoParam>::Read( const Message* m, void** iter, GpuVideoDecoderInfoParam* r) { - if (!m->ReadInt(iter, &r->decoder_id_) || - !m->ReadInt(iter, &r->decoder_route_id_) || - !m->ReadInt(iter, &r->decoder_host_route_id_)) + if (!m->ReadInt(iter, &r->context_id) || + !m->ReadInt(iter, &r->decoder_id) || + !m->ReadInt(iter, &r->decoder_route_id) || + !m->ReadInt(iter, &r->decoder_host_route_id)) return false; return true; } @@ -51,9 +53,9 @@ bool ParamTraits<GpuVideoDecoderInfoParam>::Read( void ParamTraits<GpuVideoDecoderInfoParam>::Log( const GpuVideoDecoderInfoParam& p, std::string* l) { l->append(StringPrintf("(%d, %d, %d)", - p.decoder_id_, - p.decoder_route_id_, - p.decoder_host_route_id_)); + p.decoder_id, + p.decoder_route_id, + p.decoder_host_route_id)); } /////////////////////////////////////////////////////////////////////////////// @@ -208,4 +210,3 @@ void ParamTraits<GpuVideoDecoderFormatChangeParam>::Log( p.output_buffer_size_)); } }; - diff --git a/chrome/common/gpu_video_common.h b/chrome/common/gpu_video_common.h index f1d71dd..05923b6 100644 --- a/chrome/common/gpu_video_common.h +++ b/chrome/common/gpu_video_common.h @@ -21,12 +21,18 @@ class GpuVideoServiceInfoParam { class GpuVideoDecoderInfoParam { public: - // global decoder id. - int32 decoder_id_; - // route id for GpuVideoDecoder on GPU process side for this channel. - int32 decoder_route_id_; - // route id for GpuVideoServiceHost on Render process side for this channel. - int32 decoder_host_route_id_; + // Context ID of the GLES2 context what this decoder should assicate with. + int context_id; + + // Global decoder id. + int32 decoder_id; + + // Route id for GpuVideoDecoder on GPU process side for this channel. + int32 decoder_route_id; + + // TODO(hclam): Merge this ID with |decoder_route_id_|. + // Route id for GpuVideoServiceHost on Render process side for this channel. + int32 decoder_host_route_id; }; class GpuVideoDecoderInitParam { @@ -169,4 +175,3 @@ struct ParamTraits<GpuVideoDecoderFormatChangeParam> { }; #endif // CHROME_COMMON_GPU_VIDEO_COMMON_H_ - |