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: media/gpu/android_copying_backing_strategy.h

Issue 1998723002: Move code in ui/gl/* from gfx:: to gl:: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 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 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 MEDIA_GPU_ANDROID_COPYING_BACKING_STRATEGY_H_ 5 #ifndef MEDIA_GPU_ANDROID_COPYING_BACKING_STRATEGY_H_
6 #define MEDIA_GPU_ANDROID_COPYING_BACKING_STRATEGY_H_ 6 #define MEDIA_GPU_ANDROID_COPYING_BACKING_STRATEGY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 16 matching lines...) Expand all
27 27
28 // A BackingStrategy implementation that copies images to PictureBuffer 28 // A BackingStrategy implementation that copies images to PictureBuffer
29 // textures via gpu texture copy. 29 // textures via gpu texture copy.
30 class MEDIA_GPU_EXPORT AndroidCopyingBackingStrategy 30 class MEDIA_GPU_EXPORT AndroidCopyingBackingStrategy
31 : public AndroidVideoDecodeAccelerator::BackingStrategy { 31 : public AndroidVideoDecodeAccelerator::BackingStrategy {
32 public: 32 public:
33 explicit AndroidCopyingBackingStrategy(AVDAStateProvider* state_provider); 33 explicit AndroidCopyingBackingStrategy(AVDAStateProvider* state_provider);
34 ~AndroidCopyingBackingStrategy() override; 34 ~AndroidCopyingBackingStrategy() override;
35 35
36 // AndroidVideoDecodeAccelerator::BackingStrategy 36 // AndroidVideoDecodeAccelerator::BackingStrategy
37 gfx::ScopedJavaSurface Initialize(int surface_view_id) override; 37 gl::ScopedJavaSurface Initialize(int surface_view_id) override;
38 void Cleanup( 38 void Cleanup(
39 bool have_context, 39 bool have_context,
40 const AndroidVideoDecodeAccelerator::OutputBufferMap& buffers) override; 40 const AndroidVideoDecodeAccelerator::OutputBufferMap& buffers) override;
41 scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture() const override; 41 scoped_refptr<gl::SurfaceTexture> GetSurfaceTexture() const override;
42 uint32_t GetTextureTarget() const override; 42 uint32_t GetTextureTarget() const override;
43 gfx::Size GetPictureBufferSize() const override; 43 gfx::Size GetPictureBufferSize() const override;
44 void UseCodecBufferForPictureBuffer( 44 void UseCodecBufferForPictureBuffer(
45 int32_t codec_buffer_index, 45 int32_t codec_buffer_index,
46 const media::PictureBuffer& picture_buffer) override; 46 const media::PictureBuffer& picture_buffer) override;
47 void CodecChanged(media::VideoCodecBridge* codec) override; 47 void CodecChanged(media::VideoCodecBridge* codec) override;
48 void OnFrameAvailable() override; 48 void OnFrameAvailable() override;
49 bool ArePicturesOverlayable() override; 49 bool ArePicturesOverlayable() override;
50 void UpdatePictureBufferSize(media::PictureBuffer* picture_buffer, 50 void UpdatePictureBufferSize(media::PictureBuffer* picture_buffer,
51 const gfx::Size& new_size) override; 51 const gfx::Size& new_size) override;
52 52
53 private: 53 private:
54 // Used for copy the texture from surface texture to picture buffers. 54 // Used for copy the texture from surface texture to picture buffers.
55 std::unique_ptr<gpu::CopyTextureCHROMIUMResourceManager> copier_; 55 std::unique_ptr<gpu::CopyTextureCHROMIUMResourceManager> copier_;
56 56
57 AVDAStateProvider* state_provider_; 57 AVDAStateProvider* state_provider_;
58 58
59 // A container of texture. Used to set a texture to |media_codec_|. 59 // A container of texture. Used to set a texture to |media_codec_|.
60 scoped_refptr<gfx::SurfaceTexture> surface_texture_; 60 scoped_refptr<gl::SurfaceTexture> surface_texture_;
61 61
62 // The texture id which is set to |surface_texture_|. 62 // The texture id which is set to |surface_texture_|.
63 uint32_t surface_texture_id_; 63 uint32_t surface_texture_id_;
64 64
65 media::VideoCodecBridge* media_codec_; 65 media::VideoCodecBridge* media_codec_;
66 }; 66 };
67 67
68 } // namespace media 68 } // namespace media
69 69
70 #endif // MEDIA_GPU_ANDROID_COPYING_BACKING_STRATEGY_H_ 70 #endif // MEDIA_GPU_ANDROID_COPYING_BACKING_STRATEGY_H_
OLDNEW
« no previous file with comments | « media/base/android/video_media_codec_decoder.cc ('k') | media/gpu/android_copying_backing_strategy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698