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

Unified Diff: content/common/gpu/media/dxva_video_decode_accelerator.h

Issue 540043003: Don't dismiss picture buffers on rez change until they are available (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clear vector on invalidate Created 6 years, 3 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 | content/common/gpu/media/dxva_video_decode_accelerator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/dxva_video_decode_accelerator.h
diff --git a/content/common/gpu/media/dxva_video_decode_accelerator.h b/content/common/gpu/media/dxva_video_decode_accelerator.h
index 0b92551e5bef3f1ea9d19b7a4f863cf55fe9d880..65b148b2c91ebbdd355fb9584677e3be88929d40 100644
--- a/content/common/gpu/media/dxva_video_decode_accelerator.h
+++ b/content/common/gpu/media/dxva_video_decode_accelerator.h
@@ -151,7 +151,10 @@ class CONTENT_EXPORT DXVAVideoDecodeAccelerator
typedef std::map<int32, linked_ptr<DXVAPictureBuffer> > OutputBuffers;
// Tells the client to dismiss the stale picture buffers passed in.
- void DismissStaleBuffers(const OutputBuffers& picture_buffers);
+ void DismissStaleBuffers();
+
+ // Called after the client indicates we can recycle a stale picture buffer.
+ void DeferredDismissStaleBuffer(int32 picture_buffer_id);
// To expose client callbacks from VideoDecodeAccelerator.
media::VideoDecodeAccelerator::Client* client_;
@@ -196,6 +199,12 @@ class CONTENT_EXPORT DXVAVideoDecodeAccelerator
// The key is the picture buffer id.
OutputBuffers output_picture_buffers_;
+ // After a resolution change there may be a few output buffers which have yet
+ // to be displayed so they cannot be dismissed immediately. We move them from
+ // |output_picture_buffers_| to this map so they may be dismissed once they
+ // become available.
+ OutputBuffers stale_output_picture_buffers_;
+
// Set to true if we requested picture slots from the client.
bool pictures_requested_;
« no previous file with comments | « no previous file | content/common/gpu/media/dxva_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698