OLD | NEW |
(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 VaapiPictureProvider to produce output |
| 7 // pictures. |
| 8 |
| 9 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_PICTURE_PROVIDER_DRM_H_ |
| 10 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_PICTURE_PROVIDER_DRM_H_ |
| 11 |
| 12 #include "base/callback.h" |
| 13 #include "content/common/gpu/media/vaapi_picture_provider.h" |
| 14 #include "third_party/libva/va/va.h" |
| 15 #include "ui/gfx/size.h" |
| 16 |
| 17 namespace content { |
| 18 |
| 19 class VaapiWrapper; |
| 20 |
| 21 // Implementation of the VaapiPictureProvider for the ozone/drm backed |
| 22 // chromium. |
| 23 class DrmVaapiPictureProvider : public VaapiPictureProvider { |
| 24 public: |
| 25 DrmVaapiPictureProvider( |
| 26 scoped_refptr<VaapiWrapper> vaapi_wrapper, |
| 27 const base::Callback<bool(void)> make_context_current); |
| 28 virtual ~DrmVaapiPictureProvider(); |
| 29 |
| 30 protected: |
| 31 virtual linked_ptr<VaapiPictureProvider::Picture> AllocatePicture( |
| 32 int32 picture_buffer_id, |
| 33 uint32 texture_id, |
| 34 const gfx::Size& size) override; |
| 35 |
| 36 private: |
| 37 virtual bool Initialize() override; |
| 38 |
| 39 base::Callback<bool(void)> make_context_current_; |
| 40 |
| 41 scoped_refptr<VaapiWrapper> vaapi_wrapper_; |
| 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(DrmVaapiPictureProvider); |
| 44 }; |
| 45 |
| 46 } // namespace content |
| 47 |
| 48 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_PICTURE_PROVIDER_DRM_H_ |
OLD | NEW |