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

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

Issue 1515993003: Use AVDA copying strategy unless the unified pipeline flag is set. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cl feedback 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 29 matching lines...) Expand all
40 scoped_refptr<gfx::SurfaceTexture> CreateSurfaceTexture() override; 40 scoped_refptr<gfx::SurfaceTexture> CreateSurfaceTexture() override;
41 void UseCodecBufferForPictureBuffer(int32 codec_buffer_index, 41 void UseCodecBufferForPictureBuffer(int32 codec_buffer_index,
42 const media::PictureBuffer&) override; 42 const media::PictureBuffer&) override;
43 void AssignOnePictureBuffer(const media::PictureBuffer&) override; 43 void AssignOnePictureBuffer(const media::PictureBuffer&) override;
44 void ReuseOnePictureBuffer(const media::PictureBuffer&) override; 44 void ReuseOnePictureBuffer(const media::PictureBuffer&) override;
45 void DismissOnePictureBuffer(const media::PictureBuffer&) override; 45 void DismissOnePictureBuffer(const media::PictureBuffer&) override;
46 void CodecChanged( 46 void CodecChanged(
47 media::VideoCodecBridge*, 47 media::VideoCodecBridge*,
48 const AndroidVideoDecodeAccelerator::OutputBufferMap&) override; 48 const AndroidVideoDecodeAccelerator::OutputBufferMap&) override;
49 49
50 static media::VideoDecodeAccelerator::Capabilities::Flags
51 GetCapabilitiesFlags() {
52 return media::VideoDecodeAccelerator::Capabilities::
53 NEEDS_ALL_PICTURE_BUFFERS_TO_DECODE;
54 }
55
56 private: 50 private:
57 // Release any codec buffer that is associated with the given picture buffer 51 // Release any codec buffer that is associated with the given picture buffer
58 // back to the codec. It is okay if there is no such buffer. 52 // back to the codec. It is okay if there is no such buffer.
59 void ReleaseCodecBufferForPicture(const media::PictureBuffer& picture_buffer); 53 void ReleaseCodecBufferForPicture(const media::PictureBuffer& picture_buffer);
60 54
61 // Return the TextureRef for a given PictureBuffer's texture. 55 // Return the TextureRef for a given PictureBuffer's texture.
62 gpu::gles2::TextureRef* GetTextureForPicture(const media::PictureBuffer&); 56 gpu::gles2::TextureRef* GetTextureForPicture(const media::PictureBuffer&);
63 57
64 // Return the AVDACodecImage for a given PictureBuffer's texture. 58 // Return the AVDACodecImage for a given PictureBuffer's texture.
65 AVDACodecImage* GetImageForPicture(const media::PictureBuffer&); 59 AVDACodecImage* GetImageForPicture(const media::PictureBuffer&);
66 void SetImageForPicture(const media::PictureBuffer& picture_buffer, 60 void SetImageForPicture(const media::PictureBuffer& picture_buffer,
67 const scoped_refptr<gl::GLImage>& image); 61 const scoped_refptr<gl::GLImage>& image);
68 62
69 scoped_refptr<AVDASharedState> shared_state_; 63 scoped_refptr<AVDASharedState> shared_state_;
70 64
71 AVDAStateProvider* state_provider_; 65 AVDAStateProvider* state_provider_;
72 66
73 scoped_refptr<gfx::SurfaceTexture> surface_texture_; 67 scoped_refptr<gfx::SurfaceTexture> surface_texture_;
74 68
75 media::VideoCodecBridge* media_codec_; 69 media::VideoCodecBridge* media_codec_;
76 70
77 DISALLOW_COPY_AND_ASSIGN(AndroidDeferredRenderingBackingStrategy); 71 DISALLOW_COPY_AND_ASSIGN(AndroidDeferredRenderingBackingStrategy);
78 }; 72 };
79 73
80 } // namespace content 74 } // namespace content
81 75
82 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_DEFERRED_RENDERING_BACKING_STRATEGY_ H_ 76 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_DEFERRED_RENDERING_BACKING_STRATEGY_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698