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); |
} |
} |