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

Unified Diff: ppapi/shared_impl/video_decoder_impl.cc

Issue 7765011: Allow both Context3D and Graphics3D with the video decoder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: context3d_id -> graphics_context Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/shared_impl/video_decoder_impl.h ('k') | webkit/plugins/ppapi/ppb_graphics_3d_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/video_decoder_impl.cc
diff --git a/ppapi/shared_impl/video_decoder_impl.cc b/ppapi/shared_impl/video_decoder_impl.cc
index ecdde86040c762f193ced857dc9c8bbcfbafdb58..00d971b29f0919cdecbfcef15e18f252baf796c2 100644
--- a/ppapi/shared_impl/video_decoder_impl.cc
+++ b/ppapi/shared_impl/video_decoder_impl.cc
@@ -19,30 +19,27 @@ namespace ppapi {
VideoDecoderImpl::VideoDecoderImpl()
: flush_callback_(PP_MakeCompletionCallback(NULL, NULL)),
reset_callback_(PP_MakeCompletionCallback(NULL, NULL)),
- context3d_id_(0),
+ graphics_context_(0),
gles2_impl_(NULL) {
}
VideoDecoderImpl::~VideoDecoderImpl() {
}
-bool VideoDecoderImpl::Init(PP_Resource context3d_id,
- PPB_Context3D_API* context3d,
- const PP_VideoConfigElement* decoder_config) {
- if (!context3d || !decoder_config || !context3d_id)
- return false;
-
- DCHECK(!gles2_impl_ && !context3d_id_);
- gles2_impl_ = context3d->GetGLES2Impl();
- TrackerBase::Get()->GetResourceTracker()->AddRefResource(context3d_id);
- context3d_id_ = context3d_id;
- return true;
+void VideoDecoderImpl::InitCommon(
+ PP_Resource graphics_context,
+ gpu::gles2::GLES2Implementation* gles2_impl) {
+ DCHECK(graphics_context);
+ DCHECK(!gles2_impl_ && !graphics_context_);
+ gles2_impl_ = gles2_impl;
+ TrackerBase::Get()->GetResourceTracker()->AddRefResource(graphics_context);
+ graphics_context_ = graphics_context;
}
void VideoDecoderImpl::Destroy() {
- context3d_id_ = 0;
+ graphics_context_ = 0;
gles2_impl_ = NULL;
- TrackerBase::Get()->GetResourceTracker()->ReleaseResource(context3d_id_);
+ TrackerBase::Get()->GetResourceTracker()->ReleaseResource(graphics_context_);
}
bool VideoDecoderImpl::SetFlushCallback(PP_CompletionCallback callback) {
« no previous file with comments | « ppapi/shared_impl/video_decoder_impl.h ('k') | webkit/plugins/ppapi/ppb_graphics_3d_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698