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

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

Issue 490233002: VaapiVideoAccelerator: make Vaapi accelerator work with ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix vaapi_h264_decoder_unittest Created 6 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
(Empty)
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
3 // found in the LICENSE file.
4 //
5 // This file contains an implementation of picture allocation for the
6 // Ozone window system used by VaapiVideoDecodeAccelerator to produce
7 // output pictures.
8
9 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_DRM_PICTURE_H_
10 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_DRM_PICTURE_H_
11
12 #include "base/callback.h"
13 #include "base/memory/ref_counted.h"
14 #include "content/common/gpu/media/vaapi_picture.h"
15 #include "ui/gfx/size.h"
16
17 namespace gfx {
18 class GLImageLinuxDMABuffer;
19 }
20
21 namespace ui {
22 class NativePixmap;
23 }
24
25 namespace content {
26
27 class VaapiWrapper;
28
29 // Implementation of VaapiPicture for the ozone/drm backed chromium.
30 class VaapiDrmPicture : public VaapiPicture {
31 public:
32 VaapiDrmPicture(const scoped_refptr<VaapiWrapper>& vaapi_wrapper,
33 const base::Callback<bool(void)> make_context_current,
34 int32 picture_buffer_id,
35 uint32 texture_id,
36 const gfx::Size& size);
37
38 virtual ~VaapiDrmPicture();
scherkus (not reviewing) 2014/12/10 18:56:48 s/virtual/override/
llandwerlin-old 2014/12/13 15:23:53 Done.
39
40 bool Initialize() override;
41
42 virtual bool DownloadFromSurface(
scherkus (not reviewing) 2014/12/10 18:56:48 drop virtual
llandwerlin-old 2014/12/13 15:23:54 Done.
43 const scoped_refptr<VASurface>& va_surface) override;
44
45 private:
46 scoped_refptr<VaapiWrapper> vaapi_wrapper_;
47 base::Callback<bool(void)> make_context_current_;
48 scoped_refptr<VASurface> va_surface_;
49 scoped_refptr<ui::NativePixmap> pixmap_;
50 scoped_refptr<gfx::GLImageLinuxDMABuffer> egl_image_;
51
52 DISALLOW_COPY_AND_ASSIGN(VaapiDrmPicture);
53 };
54
55 } // namespace content
56
57 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_DRM_PICTURE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698