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

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

Issue 1432963003: [Ozone] Extends the lifetime of VaapiWrapper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // This file contains an interface of output pictures for the Vaapi 5 // This file contains an interface of output pictures for the Vaapi
6 // video decoder. This is implemented by different window system 6 // video decoder. This is implemented by different window system
7 // (X11/Ozone) and used by VaapiVideoDecodeAccelerator to produce 7 // (X11/Ozone) and used by VaapiVideoDecodeAccelerator to produce
8 // output pictures. 8 // output pictures.
9 9
10 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_PICTURE_H_ 10 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_PICTURE_H_
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 // Downloads the |va_surface| into the picture, potentially scaling 45 // Downloads the |va_surface| into the picture, potentially scaling
46 // it if needed. 46 // it if needed.
47 virtual bool DownloadFromSurface( 47 virtual bool DownloadFromSurface(
48 const scoped_refptr<VASurface>& va_surface) = 0; 48 const scoped_refptr<VASurface>& va_surface) = 0;
49 49
50 // Create a VaapiPicture of |size| to be associated with 50 // Create a VaapiPicture of |size| to be associated with
51 // |picture_buffer_id| and bound to |texture_id|. 51 // |picture_buffer_id| and bound to |texture_id|.
52 // |make_context_current| is provided for the GL operations. 52 // |make_context_current| is provided for the GL operations.
53 static linked_ptr<VaapiPicture> CreatePicture( 53 static linked_ptr<VaapiPicture> CreatePicture(
54 VaapiWrapper* vaapi_wrapper, 54 const scoped_refptr<VaapiWrapper>& vaapi_wrapper,
55 const base::Callback<bool(void)> make_context_current, 55 const base::Callback<bool(void)> make_context_current,
56 int32 picture_buffer_id, 56 int32 picture_buffer_id,
57 uint32 texture_id, 57 uint32 texture_id,
58 const gfx::Size& size); 58 const gfx::Size& size);
59 59
60 // Get the texture target used to bind EGLImages (either 60 // Get the texture target used to bind EGLImages (either
61 // GL_TEXTURE_2D on X11 or GL_TEXTURE_EXTERNAL_OES on DRM). 61 // GL_TEXTURE_2D on X11 or GL_TEXTURE_EXTERNAL_OES on DRM).
62 static uint32 GetGLTextureTarget(); 62 static uint32 GetGLTextureTarget();
63 63
64 protected: 64 protected:
65 VaapiPicture(int32 picture_buffer_id, 65 VaapiPicture(int32 picture_buffer_id,
66 uint32 texture_id, 66 uint32 texture_id,
67 const gfx::Size& size) 67 const gfx::Size& size)
68 : picture_buffer_id_(picture_buffer_id), 68 : picture_buffer_id_(picture_buffer_id),
69 texture_id_(texture_id), 69 texture_id_(texture_id),
70 size_(size) {} 70 size_(size) {}
71 71
72 private: 72 private:
73 int32 picture_buffer_id_; 73 int32 picture_buffer_id_;
74 uint32 texture_id_; 74 uint32 texture_id_;
75 gfx::Size size_; 75 gfx::Size size_;
76 76
77 DISALLOW_COPY_AND_ASSIGN(VaapiPicture); 77 DISALLOW_COPY_AND_ASSIGN(VaapiPicture);
78 }; 78 };
79 79
80 } // namespace content 80 } // namespace content
81 81
82 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_PICTURE_H_ 82 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_PICTURE_H_
OLDNEW
« no previous file with comments | « content/common/gpu/media/vaapi_jpeg_decoder_unittest.cc ('k') | content/common/gpu/media/vaapi_picture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698