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

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

Issue 2361023003: Revert of Add ClientNativePixmap multi-planar support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@client-native-pixmap-dmabug-multiple-planes
Patch Set: Created 4 years, 2 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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
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.planes.emplace_back( 374 handle.native_pixmap_handle.planes.emplace_back(
375 pixmap_->GetDmaBufPitch(0), pixmap_->GetDmaBufOffset(0), 0, 375 pixmap_->GetDmaBufPitch(0), pixmap_->GetDmaBufOffset(0),
376 pixmap_->GetDmaBufModifier(0)); 376 pixmap_->GetDmaBufModifier(0));
377 #endif 377 #endif
378 return handle; 378 return handle;
379 } 379 }
380 380
381 // 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
382 // the TESTs below. 382 // the TESTs below.
383 class GLRenderingVDAClient 383 class GLRenderingVDAClient
384 : public VideoDecodeAccelerator::Client, 384 : public VideoDecodeAccelerator::Client,
385 public base::SupportsWeakPtr<GLRenderingVDAClient> { 385 public base::SupportsWeakPtr<GLRenderingVDAClient> {
(...skipping 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after
1784 media::VaapiWrapper::PreSandboxInitialization(); 1784 media::VaapiWrapper::PreSandboxInitialization();
1785 #endif 1785 #endif
1786 1786
1787 media::g_env = 1787 media::g_env =
1788 reinterpret_cast<media::VideoDecodeAcceleratorTestEnvironment*>( 1788 reinterpret_cast<media::VideoDecodeAcceleratorTestEnvironment*>(
1789 testing::AddGlobalTestEnvironment( 1789 testing::AddGlobalTestEnvironment(
1790 new media::VideoDecodeAcceleratorTestEnvironment())); 1790 new media::VideoDecodeAcceleratorTestEnvironment()));
1791 1791
1792 return RUN_ALL_TESTS(); 1792 return RUN_ALL_TESTS();
1793 } 1793 }
OLDNEW
« no previous file with comments | « gpu/ipc/client/gpu_memory_buffer_impl_ozone_native_pixmap.cc ('k') | ui/gfx/native_pixmap_handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698