summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy
diff options
context:
space:
mode:
authorbbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-16 22:01:20 +0000
committerbbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-16 22:01:20 +0000
commite9fc71c11a80196af87986b5b538e646933952c5 (patch)
tree1404e4c2b87272123691572e66abf0b3a2b516a4 /ppapi/proxy
parentf2164909fd82aee1283c9bf5c38b5e662b8db7ae (diff)
downloadchromium_src-e9fc71c11a80196af87986b5b538e646933952c5.zip
chromium_src-e9fc71c11a80196af87986b5b538e646933952c5.tar.gz
chromium_src-e9fc71c11a80196af87986b5b538e646933952c5.tar.bz2
Pepper: Fix texture management in VideoDecoderShim on Reset.
- Use a hash_set to track available textures. This prevents weird behavior if the plugin recycles a texture twice. - Fix Reset, so all textures are made available on completion. - Fix the plugin, which had a bug that allowed pictures to jump the queue and didn't behave correctly on Reset. BUG=281689 Review URL: https://codereview.chromium.org/337743003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277548 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy')
-rw-r--r--ppapi/proxy/video_decoder_resource.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/ppapi/proxy/video_decoder_resource.cc b/ppapi/proxy/video_decoder_resource.cc
index 2ca5ce2..acb5f75 100644
--- a/ppapi/proxy/video_decoder_resource.cc
+++ b/ppapi/proxy/video_decoder_resource.cc
@@ -471,6 +471,10 @@ void VideoDecoderResource::OnPluginMsgResetComplete(
const ResourceMessageReplyParams& params) {
// All shm buffers should have been made available by now.
DCHECK_EQ(shm_buffers_.size(), available_shm_buffers_.size());
+ // Received pictures are no longer valid.
+ while (!received_pictures_.empty())
+ received_pictures_.pop();
+
scoped_refptr<TrackedCallback> callback;
callback.swap(reset_callback_);
callback->Run(params.result());