| 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 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 ids; |
| 696 ids.push_back(texture_id); | 696 ids.push_back(texture_id); |
| 697 buffers.push_back(PictureBuffer(picture_buffer_id, dimensions, ids, ids)); | 697 buffers.push_back(PictureBuffer(picture_buffer_id, dimensions, |
| 698 PictureBuffer::TextureIds(), ids)); |
| 698 } | 699 } |
| 699 decoder_->AssignPictureBuffers(buffers); | 700 decoder_->AssignPictureBuffers(buffers); |
| 700 | 701 |
| 701 if (g_test_import) { | 702 if (g_test_import) { |
| 702 for (const auto& buffer : buffers) { | 703 for (const auto& buffer : buffers) { |
| 703 TextureRefMap::iterator texture_it = active_textures_.find(buffer.id()); | 704 TextureRefMap::iterator texture_it = active_textures_.find(buffer.id()); |
| 704 ASSERT_NE(active_textures_.end(), texture_it); | 705 ASSERT_NE(active_textures_.end(), texture_it); |
| 705 | 706 |
| 706 const gfx::GpuMemoryBufferHandle& handle = | 707 const gfx::GpuMemoryBufferHandle& handle = |
| 707 texture_it->second->ExportGpuMemoryBufferHandle(); | 708 texture_it->second->ExportGpuMemoryBufferHandle(); |
| (...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1794 media::VaapiWrapper::PreSandboxInitialization(); | 1795 media::VaapiWrapper::PreSandboxInitialization(); |
| 1795 #endif | 1796 #endif |
| 1796 | 1797 |
| 1797 media::g_env = | 1798 media::g_env = |
| 1798 reinterpret_cast<media::VideoDecodeAcceleratorTestEnvironment*>( | 1799 reinterpret_cast<media::VideoDecodeAcceleratorTestEnvironment*>( |
| 1799 testing::AddGlobalTestEnvironment( | 1800 testing::AddGlobalTestEnvironment( |
| 1800 new media::VideoDecodeAcceleratorTestEnvironment())); | 1801 new media::VideoDecodeAcceleratorTestEnvironment())); |
| 1801 | 1802 |
| 1802 return RUN_ALL_TESTS(); | 1803 return RUN_ALL_TESTS(); |
| 1803 } | 1804 } |
| OLD | NEW |