va_surface.cc 648 B

123456789101112131415161718192021222324
  1. // Copyright 2017 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. #include "media/gpu/vaapi/va_surface.h"
  5. namespace media {
  6. VASurface::VASurface(VASurfaceID va_surface_id,
  7. const gfx::Size& size,
  8. unsigned int format,
  9. ReleaseCB release_cb)
  10. : va_surface_id_(va_surface_id),
  11. size_(size),
  12. format_(format),
  13. release_cb_(std::move(release_cb)) {
  14. DCHECK(release_cb_);
  15. }
  16. VASurface::~VASurface() {
  17. std::move(release_cb_).Run(va_surface_id_);
  18. }
  19. } // namespace media