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

Side by Side Diff: media/gpu/video_decode_accelerator_unittest.cc

Issue 2039813002: Add format modifier IDs for EGL_EXT_image_dma_buf_import extension (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add format modifier IDs for EGL_EXT_image_dma_buf_import extension Created 4 years, 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // The bulk of this file is support code; sorry about that. Here's an overview 5 // The bulk of this file is support code; sorry about that. Here's an overview
6 // to hopefully help readers of this code: 6 // to hopefully help readers of this code:
7 // - RenderingHelper is charged with interacting with X11/{EGL/GLES2,GLX/GL} or 7 // - RenderingHelper is charged with interacting with X11/{EGL/GLES2,GLX/GL} or
8 // Win/EGL. 8 // Win/EGL.
9 // - ClientState is an enum for the state of the decode client used by the test. 9 // - ClientState is an enum for the state of the decode client used by the test.
10 // - ClientStateNotification is a barrier abstraction that allows the test code 10 // - ClientStateNotification is a barrier abstraction that allows the test code
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 364
365 gfx::GpuMemoryBufferHandle TextureRef::ExportGpuMemoryBufferHandle() const { 365 gfx::GpuMemoryBufferHandle TextureRef::ExportGpuMemoryBufferHandle() const {
366 gfx::GpuMemoryBufferHandle handle; 366 gfx::GpuMemoryBufferHandle handle;
367 #if defined(USE_OZONE) 367 #if defined(USE_OZONE)
368 CHECK(pixmap_); 368 CHECK(pixmap_);
369 int duped_fd = HANDLE_EINTR(dup(pixmap_->GetDmaBufFd(0))); 369 int duped_fd = HANDLE_EINTR(dup(pixmap_->GetDmaBufFd(0)));
370 LOG_ASSERT(duped_fd != -1) << "Failed duplicating dmabuf fd"; 370 LOG_ASSERT(duped_fd != -1) << "Failed duplicating dmabuf fd";
371 handle.type = gfx::OZONE_NATIVE_PIXMAP; 371 handle.type = gfx::OZONE_NATIVE_PIXMAP;
372 handle.native_pixmap_handle.fds.emplace_back( 372 handle.native_pixmap_handle.fds.emplace_back(
373 base::FileDescriptor(duped_fd, true)); 373 base::FileDescriptor(duped_fd, true));
374 handle.native_pixmap_handle.strides_and_offsets.emplace_back( 374 handle.native_pixmap_handle.planes.emplace_back(
375 pixmap_->GetDmaBufPitch(0), pixmap_->GetDmaBufOffset(0)); 375 pixmap_->GetDmaBufPitch(0), pixmap_->GetDmaBufOffset(0),
376 pixmap_->GetDmaBufModifier(0));
376 #endif 377 #endif
377 return handle; 378 return handle;
378 } 379 }
379 380
380 // Client that can accept callbacks from a VideoDecodeAccelerator and is used by 381 // Client that can accept callbacks from a VideoDecodeAccelerator and is used by
381 // the TESTs below. 382 // the TESTs below.
382 class GLRenderingVDAClient 383 class GLRenderingVDAClient
383 : public VideoDecodeAccelerator::Client, 384 : public VideoDecodeAccelerator::Client,
384 public base::SupportsWeakPtr<GLRenderingVDAClient> { 385 public base::SupportsWeakPtr<GLRenderingVDAClient> {
385 public: 386 public:
(...skipping 1396 matching lines...) Expand 10 before | Expand all | Expand 10 after
1782 media::VaapiWrapper::PreSandboxInitialization(); 1783 media::VaapiWrapper::PreSandboxInitialization();
1783 #endif 1784 #endif
1784 1785
1785 media::g_env = 1786 media::g_env =
1786 reinterpret_cast<media::VideoDecodeAcceleratorTestEnvironment*>( 1787 reinterpret_cast<media::VideoDecodeAcceleratorTestEnvironment*>(
1787 testing::AddGlobalTestEnvironment( 1788 testing::AddGlobalTestEnvironment(
1788 new media::VideoDecodeAcceleratorTestEnvironment())); 1789 new media::VideoDecodeAcceleratorTestEnvironment()));
1789 1790
1790 return RUN_ALL_TESTS(); 1791 return RUN_ALL_TESTS();
1791 } 1792 }
OLDNEW
« no previous file with comments | « gpu/ipc/client/gpu_memory_buffer_impl_ozone_native_pixmap.cc ('k') | third_party/khronos/EGL/eglext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698