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

Side by Side Diff: content/common/gpu/media/android_deferred_rendering_backing_strategy.h

Issue 1490333005: Don't require VDAs to return all PictureBuffers at once. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moved flags into VDA::Capabilities. Created 5 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_COMMON_GPU_MEDIA_ANDROID_DEFERRED_RENDERING_BACKING_STRATEGY_H_ 5 #ifndef CONTENT_COMMON_GPU_MEDIA_ANDROID_DEFERRED_RENDERING_BACKING_STRATEGY_H_
6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_DEFERRED_RENDERING_BACKING_STRATEGY_H_ 6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_DEFERRED_RENDERING_BACKING_STRATEGY_H_
7 7
8 #include "content/common/content_export.h" 8 #include "content/common/content_export.h"
9 #include "content/common/gpu/media/android_video_decode_accelerator.h" 9 #include "content/common/gpu/media/android_video_decode_accelerator.h"
10 10
(...skipping 30 matching lines...) Expand all
41 scoped_refptr<gfx::SurfaceTexture> CreateSurfaceTexture() override; 41 scoped_refptr<gfx::SurfaceTexture> CreateSurfaceTexture() override;
42 void UseCodecBufferForPictureBuffer(int32 codec_buffer_index, 42 void UseCodecBufferForPictureBuffer(int32 codec_buffer_index,
43 const media::PictureBuffer&) override; 43 const media::PictureBuffer&) override;
44 void AssignOnePictureBuffer(const media::PictureBuffer&) override; 44 void AssignOnePictureBuffer(const media::PictureBuffer&) override;
45 void ReuseOnePictureBuffer(const media::PictureBuffer&) override; 45 void ReuseOnePictureBuffer(const media::PictureBuffer&) override;
46 void DismissOnePictureBuffer(const media::PictureBuffer&) override; 46 void DismissOnePictureBuffer(const media::PictureBuffer&) override;
47 void CodecChanged( 47 void CodecChanged(
48 media::VideoCodecBridge*, 48 media::VideoCodecBridge*,
49 const AndroidVideoDecodeAccelerator::OutputBufferMap&) override; 49 const AndroidVideoDecodeAccelerator::OutputBufferMap&) override;
50 50
51 static media::VideoDecodeAccelerator::Capabilities::Flags
52 GetCapabilitiesFlags() {
53 return media::VideoDecodeAccelerator::Capabilities::kCanStallAnytime;
54 }
55
51 private: 56 private:
52 // Release any codec buffer that is associated with the given picture buffer 57 // Release any codec buffer that is associated with the given picture buffer
53 // back to the codec. It is okay if there is no such buffer. 58 // back to the codec. It is okay if there is no such buffer.
54 void ReleaseCodecBufferForPicture(const media::PictureBuffer& picture_buffer); 59 void ReleaseCodecBufferForPicture(const media::PictureBuffer& picture_buffer);
55 60
56 // Return the TextureRef for a given PictureBuffer's texture. 61 // Return the TextureRef for a given PictureBuffer's texture.
57 gpu::gles2::TextureRef* GetTextureForPicture(const media::PictureBuffer&); 62 gpu::gles2::TextureRef* GetTextureForPicture(const media::PictureBuffer&);
58 63
59 // Return the AVDACodecImage for a given PictureBuffer's texture. 64 // Return the AVDACodecImage for a given PictureBuffer's texture.
60 AVDACodecImage* GetImageForPicture(const media::PictureBuffer&); 65 AVDACodecImage* GetImageForPicture(const media::PictureBuffer&);
61 void SetImageForPicture(const media::PictureBuffer& picture_buffer, 66 void SetImageForPicture(const media::PictureBuffer& picture_buffer,
62 const scoped_refptr<gl::GLImage>& image); 67 const scoped_refptr<gl::GLImage>& image);
63 68
64 scoped_refptr<AVDASharedState> shared_state_; 69 scoped_refptr<AVDASharedState> shared_state_;
65 70
66 AVDAStateProvider* state_provider_; 71 AVDAStateProvider* state_provider_;
67 72
68 scoped_refptr<gfx::SurfaceTexture> surface_texture_; 73 scoped_refptr<gfx::SurfaceTexture> surface_texture_;
69 74
70 media::VideoCodecBridge* media_codec_; 75 media::VideoCodecBridge* media_codec_;
71 76
72 DISALLOW_COPY_AND_ASSIGN(AndroidDeferredRenderingBackingStrategy); 77 DISALLOW_COPY_AND_ASSIGN(AndroidDeferredRenderingBackingStrategy);
73 }; 78 };
74 79
75 } // namespace content 80 } // namespace content
76 81
77 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_DEFERRED_RENDERING_BACKING_STRATEGY_ H_ 82 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_DEFERRED_RENDERING_BACKING_STRATEGY_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698