OLD | NEW |
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 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
685 texture_ref = TextureRef::Create(texture_id, delete_texture_cb); | 685 texture_ref = TextureRef::Create(texture_id, delete_texture_cb); |
686 } | 686 } |
687 | 687 |
688 LOG_ASSERT(texture_ref); | 688 LOG_ASSERT(texture_ref); |
689 | 689 |
690 int32_t picture_buffer_id = next_picture_buffer_id_++; | 690 int32_t picture_buffer_id = next_picture_buffer_id_++; |
691 LOG_ASSERT( | 691 LOG_ASSERT( |
692 active_textures_.insert(std::make_pair(picture_buffer_id, texture_ref)) | 692 active_textures_.insert(std::make_pair(picture_buffer_id, texture_ref)) |
693 .second); | 693 .second); |
694 | 694 |
695 PictureBuffer::TextureIds ids; | 695 PictureBuffer::TextureIds texture_ids(1, texture_id); |
696 ids.push_back(texture_id); | 696 buffers.push_back(PictureBuffer(picture_buffer_id, dimensions, |
697 buffers.push_back(PictureBuffer(picture_buffer_id, dimensions, ids, ids)); | 697 PictureBuffer::TextureIds(), texture_ids)); |
698 } | 698 } |
699 decoder_->AssignPictureBuffers(buffers); | 699 decoder_->AssignPictureBuffers(buffers); |
700 | 700 |
701 if (g_test_import) { | 701 if (g_test_import) { |
702 for (const auto& buffer : buffers) { | 702 for (const auto& buffer : buffers) { |
703 TextureRefMap::iterator texture_it = active_textures_.find(buffer.id()); | 703 TextureRefMap::iterator texture_it = active_textures_.find(buffer.id()); |
704 ASSERT_NE(active_textures_.end(), texture_it); | 704 ASSERT_NE(active_textures_.end(), texture_it); |
705 | 705 |
706 const gfx::GpuMemoryBufferHandle& handle = | 706 const gfx::GpuMemoryBufferHandle& handle = |
707 texture_it->second->ExportGpuMemoryBufferHandle(); | 707 texture_it->second->ExportGpuMemoryBufferHandle(); |
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1794 media::VaapiWrapper::PreSandboxInitialization(); | 1794 media::VaapiWrapper::PreSandboxInitialization(); |
1795 #endif | 1795 #endif |
1796 | 1796 |
1797 media::g_env = | 1797 media::g_env = |
1798 reinterpret_cast<media::VideoDecodeAcceleratorTestEnvironment*>( | 1798 reinterpret_cast<media::VideoDecodeAcceleratorTestEnvironment*>( |
1799 testing::AddGlobalTestEnvironment( | 1799 testing::AddGlobalTestEnvironment( |
1800 new media::VideoDecodeAcceleratorTestEnvironment())); | 1800 new media::VideoDecodeAcceleratorTestEnvironment())); |
1801 | 1801 |
1802 return RUN_ALL_TESTS(); | 1802 return RUN_ALL_TESTS(); |
1803 } | 1803 } |
OLD | NEW |