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

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

Issue 2881553002: Add |texture_target_| and |pixel_format_| to media::PictureBuffer (Closed)
Patch Set: removed IPC changes Created 3 years, 7 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
« no previous file with comments | « media/gpu/ipc/service/gpu_video_decode_accelerator.cc ('k') | media/video/picture.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 725
726 LOG_ASSERT(texture_ref); 726 LOG_ASSERT(texture_ref);
727 727
728 int32_t picture_buffer_id = next_picture_buffer_id_++; 728 int32_t picture_buffer_id = next_picture_buffer_id_++;
729 LOG_ASSERT( 729 LOG_ASSERT(
730 active_textures_.insert(std::make_pair(picture_buffer_id, texture_ref)) 730 active_textures_.insert(std::make_pair(picture_buffer_id, texture_ref))
731 .second); 731 .second);
732 732
733 PictureBuffer::TextureIds texture_ids(1, texture_id); 733 PictureBuffer::TextureIds texture_ids(1, texture_id);
734 buffers.push_back(PictureBuffer(picture_buffer_id, dimensions, 734 buffers.push_back(PictureBuffer(picture_buffer_id, dimensions,
735 PictureBuffer::TextureIds(), texture_ids)); 735 PictureBuffer::TextureIds(), texture_ids,
736 texture_target, pixel_format));
736 } 737 }
737 decoder_->AssignPictureBuffers(buffers); 738 decoder_->AssignPictureBuffers(buffers);
738 739
739 if (g_test_import) { 740 if (g_test_import) {
740 for (const auto& buffer : buffers) { 741 for (const auto& buffer : buffers) {
741 TextureRefMap::iterator texture_it = active_textures_.find(buffer.id()); 742 TextureRefMap::iterator texture_it = active_textures_.find(buffer.id());
742 ASSERT_NE(active_textures_.end(), texture_it); 743 ASSERT_NE(active_textures_.end(), texture_it);
743 744
744 const gfx::GpuMemoryBufferHandle& handle = 745 const gfx::GpuMemoryBufferHandle& handle =
745 texture_it->second->ExportGpuMemoryBufferHandle(); 746 texture_it->second->ExportGpuMemoryBufferHandle();
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1916 media::g_thumbnail_output_dir = base::FilePath(it->second.c_str()); 1917 media::g_thumbnail_output_dir = base::FilePath(it->second.c_str());
1917 } 1918 }
1918 } 1919 }
1919 1920
1920 base::ShadowingAtExitManager at_exit_manager; 1921 base::ShadowingAtExitManager at_exit_manager;
1921 1922
1922 return base::LaunchUnitTestsSerially( 1923 return base::LaunchUnitTestsSerially(
1923 argc, argv, 1924 argc, argv,
1924 base::Bind(&media::VDATestSuite::Run, base::Unretained(&test_suite))); 1925 base::Bind(&media::VDATestSuite::Run, base::Unretained(&test_suite)));
1925 } 1926 }
OLDNEW
« no previous file with comments | « media/gpu/ipc/service/gpu_video_decode_accelerator.cc ('k') | media/video/picture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698