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

Side by Side Diff: media/gpu/avda_state_provider.h

Issue 2296513003: Delete AVDACopyingBackingStrategy and rename AVDADeferredRenderingBackingStrategy (Closed)
Patch Set: Undelete & fix unittest Created 4 years, 3 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_AVDA_STATE_PROVIDER_H_ 5 #ifndef MEDIA_GPU_AVDA_STATE_PROVIDER_H_
6 #define MEDIA_GPU_AVDA_STATE_PROVIDER_H_ 6 #define MEDIA_GPU_AVDA_STATE_PROVIDER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/threading/thread_checker.h" 9 #include "base/threading/thread_checker.h"
10 #include "gpu/command_buffer/service/texture_manager.h" 10 #include "gpu/command_buffer/service/texture_manager.h"
11 #include "media/video/video_decode_accelerator.h" 11 #include "media/video/video_decode_accelerator.h"
12 12
13 namespace gl {
14 class SurfaceTexture;
15 }
16
17 namespace gpu { 13 namespace gpu {
18 namespace gles2 { 14 namespace gles2 {
19 class GLES2Decoder; 15 class GLES2Decoder;
20 } 16 }
21 } 17 }
22 18
23 namespace media { 19 namespace media {
24 20
25 // Helper class that provides the BackingStrategy with enough state 21 // Helper class that provides AVDAPictureBufferManager with enough state
26 // to do useful work. 22 // to do useful work.
27 class AVDAStateProvider { 23 class AVDAStateProvider {
28 public: 24 public:
29 // Various handy getters. 25 // Various handy getters.
30 virtual const gfx::Size& GetSize() const = 0; 26 virtual const gfx::Size& GetSize() const = 0;
31 virtual const base::ThreadChecker& ThreadChecker() const = 0;
32 virtual base::WeakPtr<gpu::gles2::GLES2Decoder> GetGlDecoder() const = 0; 27 virtual base::WeakPtr<gpu::gles2::GLES2Decoder> GetGlDecoder() const = 0;
33 virtual gpu::gles2::TextureRef* GetTextureForPicture(
34 const PictureBuffer& picture_buffer) = 0;
35
36 // Create a SurfaceTexture and attach a new gl texture to it. |*service_id|
37 // is set to the created texture id.
38 virtual scoped_refptr<gl::SurfaceTexture> CreateAttachedSurfaceTexture(
39 GLuint* service_id) = 0;
40 28
41 // Helper function to report an error condition and stop decoding. 29 // Helper function to report an error condition and stop decoding.
42 // This will post NotifyError(), and transition to the error state. 30 // This will post NotifyError(), and transition to the error state.
43 // It is meant to be called from the RETURN_ON_FAILURE macro. 31 // It is meant to be called from the RETURN_ON_FAILURE macro.
44 virtual void PostError(const ::tracked_objects::Location& from_here, 32 virtual void PostError(const ::tracked_objects::Location& from_here,
45 VideoDecodeAccelerator::Error error) = 0; 33 VideoDecodeAccelerator::Error error) = 0;
46 34
47 protected: 35 protected:
48 ~AVDAStateProvider() = default; 36 ~AVDAStateProvider() = default;
49 }; 37 };
50 38
51 } // namespace media 39 } // namespace media
52 40
53 #endif // MEDIA_GPU_AVDA_STATE_PROVIDER_H_ 41 #endif // MEDIA_GPU_AVDA_STATE_PROVIDER_H_
OLDNEW
« media/gpu/android_video_decode_accelerator.cc ('K') | « media/gpu/avda_return_on_failure.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698