| Index: content/common/gpu/media/android_deferred_rendering_backing_strategy.h
|
| diff --git a/content/common/gpu/media/android_deferred_rendering_backing_strategy.h b/content/common/gpu/media/android_deferred_rendering_backing_strategy.h
|
| deleted file mode 100644
|
| index 733b25b0a45a7685449bdb4cb00e2b4b3a45267e..0000000000000000000000000000000000000000
|
| --- a/content/common/gpu/media/android_deferred_rendering_backing_strategy.h
|
| +++ /dev/null
|
| @@ -1,101 +0,0 @@
|
| -// Copyright 2015 The Chromium Authors. All rights reserved.
|
| -// Use of this source code is governed by a BSD-style license that can be
|
| -// found in the LICENSE file.
|
| -
|
| -#ifndef CONTENT_COMMON_GPU_MEDIA_ANDROID_DEFERRED_RENDERING_BACKING_STRATEGY_H_
|
| -#define CONTENT_COMMON_GPU_MEDIA_ANDROID_DEFERRED_RENDERING_BACKING_STRATEGY_H_
|
| -
|
| -#include <stdint.h>
|
| -
|
| -#include "base/macros.h"
|
| -#include "content/common/content_export.h"
|
| -#include "content/common/gpu/media/android_video_decode_accelerator.h"
|
| -
|
| -namespace gl {
|
| -class GLImage;
|
| -}
|
| -
|
| -namespace gpu {
|
| -namespace gles2 {
|
| -class GLStreamTextureImage;
|
| -class TextureRef;
|
| -}
|
| -}
|
| -
|
| -namespace content {
|
| -
|
| -class AVDACodecImage;
|
| -class AVDASharedState;
|
| -
|
| -// A BackingStrategy implementation that defers releasing codec buffers until
|
| -// a PictureBuffer's texture is used to draw, then draws using the surface
|
| -// texture's front buffer rather than a copy. To do this, it uses a GLImage
|
| -// implementation to talk to MediaCodec.
|
| -class CONTENT_EXPORT AndroidDeferredRenderingBackingStrategy
|
| - : public AndroidVideoDecodeAccelerator::BackingStrategy {
|
| - public:
|
| - explicit AndroidDeferredRenderingBackingStrategy(
|
| - AVDAStateProvider* state_provider);
|
| - ~AndroidDeferredRenderingBackingStrategy() override;
|
| -
|
| - // AndroidVideoDecodeAccelerator::BackingStrategy
|
| - gfx::ScopedJavaSurface Initialize(int surface_view_id) override;
|
| - void Cleanup(bool have_context,
|
| - const AndroidVideoDecodeAccelerator::OutputBufferMap&) override;
|
| - scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture() const override;
|
| - uint32_t GetTextureTarget() const override;
|
| - gfx::Size GetPictureBufferSize() const override;
|
| - void UseCodecBufferForPictureBuffer(int32_t codec_buffer_index,
|
| - const media::PictureBuffer&) override;
|
| - void AssignOnePictureBuffer(const media::PictureBuffer&, bool) override;
|
| - void ReuseOnePictureBuffer(const media::PictureBuffer&) override;
|
| - void CodecChanged(
|
| - media::VideoCodecBridge*,
|
| - const AndroidVideoDecodeAccelerator::OutputBufferMap&) override;
|
| - void OnFrameAvailable() override;
|
| - bool ArePicturesOverlayable() override;
|
| - void UpdatePictureBufferSize(media::PictureBuffer* picture_buffer,
|
| - const gfx::Size& new_size) override;
|
| -
|
| - private:
|
| - // Release any codec buffer that is associated with the given picture buffer
|
| - // back to the codec. It is okay if there is no such buffer.
|
| - void ReleaseCodecBufferForPicture(const media::PictureBuffer& picture_buffer);
|
| -
|
| - // Return the AVDACodecImage for a given PictureBuffer's texture.
|
| - AVDACodecImage* GetImageForPicture(const media::PictureBuffer&);
|
| - void SetImageForPicture(
|
| - const media::PictureBuffer& picture_buffer,
|
| - const scoped_refptr<gpu::gles2::GLStreamTextureImage>& image);
|
| -
|
| - // Make a copy of the SurfaceTexture's front buffer and associate all given
|
| - // picture buffer textures with it. The picture buffer textures will not
|
| - // dependend on |this|, the SurfaceTexture, the MediaCodec or the VDA, so it's
|
| - // used to back the picture buffers when the VDA is being destroyed.
|
| - void CopySurfaceTextureToPictures(
|
| - const AndroidVideoDecodeAccelerator::OutputBufferMap& buffers);
|
| -
|
| - // Return true if and only if the surface_texture_cant_detach workaround is
|
| - // not set.
|
| - bool DoesSurfaceTextureDetachWork() const;
|
| -
|
| - // Return true if and only if CopySurfaceTextureToPictures is expected to work
|
| - // on this device.
|
| - bool ShouldCopyPictures() const;
|
| -
|
| - scoped_refptr<AVDASharedState> shared_state_;
|
| -
|
| - AVDAStateProvider* state_provider_;
|
| -
|
| - // The SurfaceTexture to render to. Non-null after Initialize() if
|
| - // we're not rendering to a SurfaceView.
|
| - scoped_refptr<gfx::SurfaceTexture> surface_texture_;
|
| -
|
| - media::VideoCodecBridge* media_codec_;
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(AndroidDeferredRenderingBackingStrategy);
|
| -};
|
| -
|
| -} // namespace content
|
| -
|
| -#endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_DEFERRED_RENDERING_BACKING_STRATEGY_H_
|
|
|