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

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

Issue 7607014: Fix sporadic crash at the end of gles2 ppapi plugin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « no previous file | no next file » | 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 aa3a4fbc2e59ef0eddc1d40b5c29cd209f2d9bb1..c845e1d1fb234ad5cd9625ed55d779fa28f753d7 100644
--- a/ppapi/examples/gles2/gles2.cc
+++ b/ppapi/examples/gles2/gles2.cc
@@ -85,6 +85,7 @@ class GLES2DemoInstance : public pp::Instance,
void DecodeNextNALUs();
void DecodeNextNALU();
void GetNextNALUBoundary(size_t start_pos, size_t* end_pos);
+ void PaintPicture(const PP_Picture_Dev& picture);
void Render(const PP_PictureBuffer_Dev& buffer);
void DeleteOutstandingBitstreamBuffers();
@@ -324,6 +325,10 @@ void GLES2DemoInstance::DismissPictureBuffer(PP_Resource decoder,
void GLES2DemoInstance::PictureReady(PP_Resource decoder,
const PP_Picture_Dev& picture) {
assert(decoder == video_decoder_->pp_resource());
+ PaintPicture(picture);
+}
+
+void GLES2DemoInstance::PaintPicture(const PP_Picture_Dev& picture) {
if (first_frame_delivered_ticks_ == -1)
assert((first_frame_delivered_ticks_ = core_if_->GetTimeTicks()) != -1);
if (is_painting_) {
@@ -419,7 +424,7 @@ void GLES2DemoInstance::PaintFinished(int32_t result, int picture_buffer_id) {
while (!pictures_pending_paint_.empty() && !is_painting_) {
PP_Picture_Dev picture = pictures_pending_paint_.front();
pictures_pending_paint_.pop_front();
- PictureReady(video_decoder_->pp_resource(), picture);
+ PaintPicture(picture);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698