| 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 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 CreateV4L2SliceVDA(), | 589 CreateV4L2SliceVDA(), |
| 590 CreateVaapiVDA(), | 590 CreateVaapiVDA(), |
| 591 }; | 591 }; |
| 592 | 592 |
| 593 for (size_t i = 0; i < arraysize(decoders); ++i) { | 593 for (size_t i = 0; i < arraysize(decoders); ++i) { |
| 594 if (!decoders[i]) | 594 if (!decoders[i]) |
| 595 continue; | 595 continue; |
| 596 decoder_ = decoders[i].Pass(); | 596 decoder_ = decoders[i].Pass(); |
| 597 weak_decoder_factory_.reset( | 597 weak_decoder_factory_.reset( |
| 598 new base::WeakPtrFactory<VideoDecodeAccelerator>(decoder_.get())); | 598 new base::WeakPtrFactory<VideoDecodeAccelerator>(decoder_.get())); |
| 599 if (decoder_->Initialize(profile_, client)) { | 599 if (decoder_->Initialize(profile_, 0, client)) { |
| 600 SetState(CS_DECODER_SET); | 600 SetState(CS_DECODER_SET); |
| 601 FinishInitialization(); | 601 FinishInitialization(); |
| 602 return; | 602 return; |
| 603 } | 603 } |
| 604 } | 604 } |
| 605 // Decoders are all initialize failed. | 605 // Decoders are all initialize failed. |
| 606 LOG(ERROR) << "VideoDecodeAccelerator::Initialize() failed"; | 606 LOG(ERROR) << "VideoDecodeAccelerator::Initialize() failed"; |
| 607 CHECK(false); | 607 CHECK(false); |
| 608 } | 608 } |
| 609 | 609 |
| (...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1640 content::VaapiWrapper::PreSandboxInitialization(); | 1640 content::VaapiWrapper::PreSandboxInitialization(); |
| 1641 #endif | 1641 #endif |
| 1642 | 1642 |
| 1643 content::g_env = | 1643 content::g_env = |
| 1644 reinterpret_cast<content::VideoDecodeAcceleratorTestEnvironment*>( | 1644 reinterpret_cast<content::VideoDecodeAcceleratorTestEnvironment*>( |
| 1645 testing::AddGlobalTestEnvironment( | 1645 testing::AddGlobalTestEnvironment( |
| 1646 new content::VideoDecodeAcceleratorTestEnvironment())); | 1646 new content::VideoDecodeAcceleratorTestEnvironment())); |
| 1647 | 1647 |
| 1648 return RUN_ALL_TESTS(); | 1648 return RUN_ALL_TESTS(); |
| 1649 } | 1649 } |
| OLD | NEW |