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_; |