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

Unified Diff: ppapi/examples/gles2/gles2.cc

Issue 7260008: Implement proper synchronization between HW video decode IPC and CommandBuffer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 6 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 | « media/video/video_decode_accelerator.h ('k') | webkit/plugins/ppapi/mock_plugin_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/examples/gles2/gles2.cc
diff --git a/ppapi/examples/gles2/gles2.cc b/ppapi/examples/gles2/gles2.cc
index 0499958a5233454c5a151297ce498eaf938aa4f4..657159b056d13b20f027da9c92691e95f91a713d 100644
--- a/ppapi/examples/gles2/gles2.cc
+++ b/ppapi/examples/gles2/gles2.cc
@@ -73,14 +73,6 @@ class GLES2DemoInstance : public pp::Instance, public pp::Graphics3DClient_Dev,
GLuint vertex_buffers[2];
};
- // Serialize PPB_Video_Decoder_Dev operations w.r.t. GPU command buffer.
- // TODO(fischman): figure out how much of this is actually necessary.
- // Probably any necessary serialization ought to be happening in the
- // PPAPI implementation, not in the plugin!
- void FinishGL() {
- gles2_if_->Finish(context_->pp_resource());
- }
-
// Initialize Video Decoder.
void InitializeDecoder();
@@ -272,7 +264,6 @@ void GLES2DemoInstance::ProvidePictureBuffers(
buffers.push_back(buffer);
assert(buffers_by_id_.insert(std::make_pair(id, buffer)).second);
}
- FinishGL();
video_decoder_->AssignGLESBuffers(buffers);
}
@@ -282,8 +273,6 @@ void GLES2DemoInstance::DismissPictureBuffer(
assert(it != buffers_by_id_.end());
DeleteTexture(it->second.texture_id);
buffers_by_id_.erase(it);
-
- FinishGL();
}
void GLES2DemoInstance::PictureReady(
@@ -340,18 +329,14 @@ void GLES2DemoInstance::InitGL() {
assertNoGLError();
CreateGLObjects();
-
- FinishGL();
}
void GLES2DemoInstance::Render(const PP_GLESBuffer_Dev& buffer) {
if (is_painting_) {
// We are dropping frames if we don't render fast enough -
// that is why sometimes the last frame rendered is < 249.
- if (video_decoder_) {
- FinishGL();
+ if (video_decoder_)
video_decoder_->ReusePictureBuffer(buffer.info.id);
- }
return;
}
is_painting_ = true;
@@ -369,7 +354,6 @@ void GLES2DemoInstance::Render(const PP_GLESBuffer_Dev& buffer) {
void GLES2DemoInstance::PaintFinished(int32_t result, int picture_buffer_id) {
is_painting_ = false;
- FinishGL();
if (video_decoder_)
video_decoder_->ReusePictureBuffer(picture_buffer_id);
}
« no previous file with comments | « media/video/video_decode_accelerator.h ('k') | webkit/plugins/ppapi/mock_plugin_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698