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 29 matching lines...) Expand all Loading... |
40 #include "base/strings/stringize_macros.h" | 40 #include "base/strings/stringize_macros.h" |
41 #include "base/strings/stringprintf.h" | 41 #include "base/strings/stringprintf.h" |
42 #include "base/strings/utf_string_conversions.h" | 42 #include "base/strings/utf_string_conversions.h" |
43 #include "base/synchronization/condition_variable.h" | 43 #include "base/synchronization/condition_variable.h" |
44 #include "base/synchronization/lock.h" | 44 #include "base/synchronization/lock.h" |
45 #include "base/synchronization/waitable_event.h" | 45 #include "base/synchronization/waitable_event.h" |
46 #include "base/thread_task_runner_handle.h" | 46 #include "base/thread_task_runner_handle.h" |
47 #include "base/threading/thread.h" | 47 #include "base/threading/thread.h" |
48 #include "build/build_config.h" | 48 #include "build/build_config.h" |
49 #include "content/common/gpu/media/fake_video_decode_accelerator.h" | 49 #include "content/common/gpu/media/fake_video_decode_accelerator.h" |
50 #include "content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.h" | |
51 #include "content/common/gpu/media/rendering_helper.h" | 50 #include "content/common/gpu/media/rendering_helper.h" |
52 #include "content/common/gpu/media/video_accelerator_unittest_helpers.h" | 51 #include "content/common/gpu/media/video_accelerator_unittest_helpers.h" |
53 #include "gpu/command_buffer/service/gpu_preferences.h" | |
54 #include "media/filters/h264_parser.h" | 52 #include "media/filters/h264_parser.h" |
55 #include "testing/gtest/include/gtest/gtest.h" | 53 #include "testing/gtest/include/gtest/gtest.h" |
56 #include "ui/gfx/codec/png_codec.h" | 54 #include "ui/gfx/codec/png_codec.h" |
57 #include "ui/gl/gl_image.h" | 55 #include "ui/gl/gl_image.h" |
58 | 56 |
59 #if defined(OS_WIN) | 57 #if defined(OS_WIN) |
60 #include "base/win/windows_version.h" | 58 #include "base/win/windows_version.h" |
61 #include "content/common/gpu/media/dxva_video_decode_accelerator_win.h" | 59 #include "content/common/gpu/media/dxva_video_decode_accelerator_win.h" |
62 #elif defined(OS_CHROMEOS) | 60 #elif defined(OS_CHROMEOS) |
63 #if defined(USE_V4L2_CODEC) | 61 #if defined(USE_V4L2_CODEC) |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 int num_queued_fragments() { return num_queued_fragments_; } | 351 int num_queued_fragments() { return num_queued_fragments_; } |
354 int num_decoded_frames() { return num_decoded_frames_; } | 352 int num_decoded_frames() { return num_decoded_frames_; } |
355 double frames_per_second(); | 353 double frames_per_second(); |
356 // Return the median of the decode time of all decoded frames. | 354 // Return the median of the decode time of all decoded frames. |
357 base::TimeDelta decode_time_median(); | 355 base::TimeDelta decode_time_median(); |
358 bool decoder_deleted() { return !decoder_.get(); } | 356 bool decoder_deleted() { return !decoder_.get(); } |
359 | 357 |
360 private: | 358 private: |
361 typedef std::map<int32_t, scoped_refptr<TextureRef>> TextureRefMap; | 359 typedef std::map<int32_t, scoped_refptr<TextureRef>> TextureRefMap; |
362 | 360 |
| 361 scoped_ptr<media::VideoDecodeAccelerator> CreateFakeVDA(); |
| 362 scoped_ptr<media::VideoDecodeAccelerator> CreateDXVAVDA(); |
| 363 scoped_ptr<media::VideoDecodeAccelerator> CreateV4L2VDA(); |
| 364 scoped_ptr<media::VideoDecodeAccelerator> CreateV4L2SliceVDA(); |
| 365 scoped_ptr<media::VideoDecodeAccelerator> CreateVaapiVDA(); |
| 366 |
| 367 void BindImage(uint32_t client_texture_id, |
| 368 uint32_t texture_target, |
| 369 scoped_refptr<gl::GLImage> image, |
| 370 bool can_bind_as_sampler); |
| 371 |
363 void SetState(ClientState new_state); | 372 void SetState(ClientState new_state); |
364 void FinishInitialization(); | 373 void FinishInitialization(); |
365 void ReturnPicture(int32_t picture_buffer_id); | 374 void ReturnPicture(int32_t picture_buffer_id); |
366 | 375 |
367 // Delete the associated decoder helper. | 376 // Delete the associated decoder helper. |
368 void DeleteDecoder(); | 377 void DeleteDecoder(); |
369 | 378 |
370 // Compute & return the first encoded bytes (including a start frame) to send | 379 // Compute & return the first encoded bytes (including a start frame) to send |
371 // to the decoder, starting at |start_pos| and returning one fragment. Skips | 380 // to the decoder, starting at |start_pos| and returning one fragment. Skips |
372 // to the first decodable position. | 381 // to the first decodable position. |
(...skipping 12 matching lines...) Expand all Loading... |
385 size_t window_id_; | 394 size_t window_id_; |
386 RenderingHelper* rendering_helper_; | 395 RenderingHelper* rendering_helper_; |
387 gfx::Size frame_size_; | 396 gfx::Size frame_size_; |
388 std::string encoded_data_; | 397 std::string encoded_data_; |
389 const int num_in_flight_decodes_; | 398 const int num_in_flight_decodes_; |
390 int outstanding_decodes_; | 399 int outstanding_decodes_; |
391 size_t encoded_data_next_pos_to_decode_; | 400 size_t encoded_data_next_pos_to_decode_; |
392 int next_bitstream_buffer_id_; | 401 int next_bitstream_buffer_id_; |
393 ClientStateNotification<ClientState>* note_; | 402 ClientStateNotification<ClientState>* note_; |
394 scoped_ptr<VideoDecodeAccelerator> decoder_; | 403 scoped_ptr<VideoDecodeAccelerator> decoder_; |
395 base::WeakPtr<VideoDecodeAccelerator> weak_vda_; | 404 scoped_ptr<base::WeakPtrFactory<VideoDecodeAccelerator> > |
396 scoped_ptr<base::WeakPtrFactory<VideoDecodeAccelerator>> | 405 weak_decoder_factory_; |
397 weak_vda_ptr_factory_; | |
398 scoped_ptr<GpuVideoDecodeAcceleratorFactoryImpl> vda_factory_; | |
399 int remaining_play_throughs_; | 406 int remaining_play_throughs_; |
400 int reset_after_frame_num_; | 407 int reset_after_frame_num_; |
401 int delete_decoder_state_; | 408 int delete_decoder_state_; |
402 ClientState state_; | 409 ClientState state_; |
403 int num_skipped_fragments_; | 410 int num_skipped_fragments_; |
404 int num_queued_fragments_; | 411 int num_queued_fragments_; |
405 int num_decoded_frames_; | 412 int num_decoded_frames_; |
406 int num_done_bitstream_buffers_; | 413 int num_done_bitstream_buffers_; |
407 base::TimeTicks initialize_done_ticks_; | 414 base::TimeTicks initialize_done_ticks_; |
408 media::VideoCodecProfile profile_; | 415 media::VideoCodecProfile profile_; |
(...skipping 17 matching lines...) Expand all Loading... |
426 // textures. | 433 // textures. |
427 TextureRefMap active_textures_; | 434 TextureRefMap active_textures_; |
428 | 435 |
429 // A map of the textures that are still pending in the renderer. | 436 // A map of the textures that are still pending in the renderer. |
430 // We check this to ensure all frames are rendered before entering the | 437 // We check this to ensure all frames are rendered before entering the |
431 // CS_RESET_State. | 438 // CS_RESET_State. |
432 TextureRefMap pending_textures_; | 439 TextureRefMap pending_textures_; |
433 | 440 |
434 int32_t next_picture_buffer_id_; | 441 int32_t next_picture_buffer_id_; |
435 | 442 |
436 base::WeakPtr<GLRenderingVDAClient> weak_this_; | |
437 base::WeakPtrFactory<GLRenderingVDAClient> weak_this_factory_; | |
438 | |
439 DISALLOW_IMPLICIT_CONSTRUCTORS(GLRenderingVDAClient); | 443 DISALLOW_IMPLICIT_CONSTRUCTORS(GLRenderingVDAClient); |
440 }; | 444 }; |
441 | 445 |
442 static bool DoNothingReturnTrue() { | |
443 return true; | |
444 } | |
445 | |
446 static bool DummyBindImage(uint32_t client_texture_id, | |
447 uint32_t texture_target, | |
448 const scoped_refptr<gl::GLImage>& image, | |
449 bool can_bind_to_sampler) { | |
450 return true; | |
451 } | |
452 | |
453 GLRenderingVDAClient::GLRenderingVDAClient( | 446 GLRenderingVDAClient::GLRenderingVDAClient( |
454 size_t window_id, | 447 size_t window_id, |
455 RenderingHelper* rendering_helper, | 448 RenderingHelper* rendering_helper, |
456 ClientStateNotification<ClientState>* note, | 449 ClientStateNotification<ClientState>* note, |
457 const std::string& encoded_data, | 450 const std::string& encoded_data, |
458 int num_in_flight_decodes, | 451 int num_in_flight_decodes, |
459 int num_play_throughs, | 452 int num_play_throughs, |
460 int reset_after_frame_num, | 453 int reset_after_frame_num, |
461 int delete_decoder_state, | 454 int delete_decoder_state, |
462 int frame_width, | 455 int frame_width, |
(...skipping 20 matching lines...) Expand all Loading... |
483 num_skipped_fragments_(0), | 476 num_skipped_fragments_(0), |
484 num_queued_fragments_(0), | 477 num_queued_fragments_(0), |
485 num_decoded_frames_(0), | 478 num_decoded_frames_(0), |
486 num_done_bitstream_buffers_(0), | 479 num_done_bitstream_buffers_(0), |
487 fake_decoder_(fake_decoder), | 480 fake_decoder_(fake_decoder), |
488 texture_target_(0), | 481 texture_target_(0), |
489 suppress_rendering_(suppress_rendering), | 482 suppress_rendering_(suppress_rendering), |
490 delay_reuse_after_frame_num_(delay_reuse_after_frame_num), | 483 delay_reuse_after_frame_num_(delay_reuse_after_frame_num), |
491 decode_calls_per_second_(decode_calls_per_second), | 484 decode_calls_per_second_(decode_calls_per_second), |
492 render_as_thumbnails_(render_as_thumbnails), | 485 render_as_thumbnails_(render_as_thumbnails), |
493 next_picture_buffer_id_(1), | 486 next_picture_buffer_id_(1) { |
494 weak_this_factory_(this) { | |
495 LOG_ASSERT(num_in_flight_decodes > 0); | 487 LOG_ASSERT(num_in_flight_decodes > 0); |
496 LOG_ASSERT(num_play_throughs > 0); | 488 LOG_ASSERT(num_play_throughs > 0); |
497 // |num_in_flight_decodes_| is unsupported if |decode_calls_per_second_| > 0. | 489 // |num_in_flight_decodes_| is unsupported if |decode_calls_per_second_| > 0. |
498 if (decode_calls_per_second_ > 0) | 490 if (decode_calls_per_second_ > 0) |
499 LOG_ASSERT(1 == num_in_flight_decodes_); | 491 LOG_ASSERT(1 == num_in_flight_decodes_); |
500 | 492 |
501 // Default to H264 baseline if no profile provided. | 493 // Default to H264 baseline if no profile provided. |
502 profile_ = (profile != media::VIDEO_CODEC_PROFILE_UNKNOWN | 494 profile_ = (profile != media::VIDEO_CODEC_PROFILE_UNKNOWN |
503 ? profile | 495 ? profile |
504 : media::H264PROFILE_BASELINE); | 496 : media::H264PROFILE_BASELINE); |
505 | |
506 weak_this_ = weak_this_factory_.GetWeakPtr(); | |
507 } | 497 } |
508 | 498 |
509 GLRenderingVDAClient::~GLRenderingVDAClient() { | 499 GLRenderingVDAClient::~GLRenderingVDAClient() { |
510 DeleteDecoder(); // Clean up in case of expected error. | 500 DeleteDecoder(); // Clean up in case of expected error. |
511 LOG_ASSERT(decoder_deleted()); | 501 LOG_ASSERT(decoder_deleted()); |
512 SetState(CS_DESTROYED); | 502 SetState(CS_DESTROYED); |
513 } | 503 } |
514 | 504 |
| 505 static bool DoNothingReturnTrue() { return true; } |
| 506 |
| 507 scoped_ptr<media::VideoDecodeAccelerator> |
| 508 GLRenderingVDAClient::CreateFakeVDA() { |
| 509 scoped_ptr<media::VideoDecodeAccelerator> decoder; |
| 510 if (fake_decoder_) { |
| 511 decoder.reset(new FakeVideoDecodeAccelerator( |
| 512 static_cast<gfx::GLContext*> (rendering_helper_->GetGLContextHandle()), |
| 513 frame_size_, |
| 514 base::Bind(&DoNothingReturnTrue))); |
| 515 } |
| 516 return decoder; |
| 517 } |
| 518 |
| 519 scoped_ptr<media::VideoDecodeAccelerator> |
| 520 GLRenderingVDAClient::CreateDXVAVDA() { |
| 521 scoped_ptr<media::VideoDecodeAccelerator> decoder; |
| 522 #if defined(OS_WIN) |
| 523 if (base::win::GetVersion() >= base::win::VERSION_WIN7) { |
| 524 const bool enable_accelerated_vpx_decode = false; |
| 525 decoder.reset(new DXVAVideoDecodeAccelerator( |
| 526 base::Bind(&DoNothingReturnTrue), |
| 527 rendering_helper_->GetGLContext().get(), |
| 528 enable_accelerated_vpx_decode)); |
| 529 } |
| 530 #endif |
| 531 return decoder; |
| 532 } |
| 533 |
| 534 scoped_ptr<media::VideoDecodeAccelerator> |
| 535 GLRenderingVDAClient::CreateV4L2VDA() { |
| 536 scoped_ptr<media::VideoDecodeAccelerator> decoder; |
| 537 #if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC) |
| 538 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); |
| 539 if (device.get()) { |
| 540 base::WeakPtr<VideoDecodeAccelerator::Client> weak_client = AsWeakPtr(); |
| 541 decoder.reset(new V4L2VideoDecodeAccelerator( |
| 542 static_cast<EGLDisplay>(rendering_helper_->GetGLDisplay()), |
| 543 static_cast<EGLContext>(rendering_helper_->GetGLContextHandle()), |
| 544 weak_client, base::Bind(&DoNothingReturnTrue), device, |
| 545 base::ThreadTaskRunnerHandle::Get())); |
| 546 } |
| 547 #endif |
| 548 return decoder; |
| 549 } |
| 550 |
| 551 scoped_ptr<media::VideoDecodeAccelerator> |
| 552 GLRenderingVDAClient::CreateV4L2SliceVDA() { |
| 553 scoped_ptr<media::VideoDecodeAccelerator> decoder; |
| 554 #if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC) |
| 555 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); |
| 556 if (device.get()) { |
| 557 base::WeakPtr<VideoDecodeAccelerator::Client> weak_client = AsWeakPtr(); |
| 558 decoder.reset(new V4L2SliceVideoDecodeAccelerator( |
| 559 device, static_cast<EGLDisplay>(rendering_helper_->GetGLDisplay()), |
| 560 static_cast<EGLContext>(rendering_helper_->GetGLContextHandle()), |
| 561 weak_client, base::Bind(&DoNothingReturnTrue), |
| 562 base::ThreadTaskRunnerHandle::Get())); |
| 563 } |
| 564 #endif |
| 565 return decoder; |
| 566 } |
| 567 |
| 568 scoped_ptr<media::VideoDecodeAccelerator> |
| 569 GLRenderingVDAClient::CreateVaapiVDA() { |
| 570 scoped_ptr<media::VideoDecodeAccelerator> decoder; |
| 571 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) |
| 572 decoder.reset(new VaapiVideoDecodeAccelerator( |
| 573 base::Bind(&DoNothingReturnTrue), |
| 574 base::Bind(&GLRenderingVDAClient::BindImage, base::Unretained(this)))); |
| 575 #endif |
| 576 return decoder; |
| 577 } |
| 578 |
| 579 void GLRenderingVDAClient::BindImage(uint32_t client_texture_id, |
| 580 uint32_t texture_target, |
| 581 scoped_refptr<gl::GLImage> image, |
| 582 bool can_bind_to_sampler) {} |
| 583 |
515 void GLRenderingVDAClient::CreateAndStartDecoder() { | 584 void GLRenderingVDAClient::CreateAndStartDecoder() { |
516 LOG_ASSERT(decoder_deleted()); | 585 LOG_ASSERT(decoder_deleted()); |
517 LOG_ASSERT(!decoder_.get()); | 586 LOG_ASSERT(!decoder_.get()); |
518 | 587 |
519 if (fake_decoder_) { | 588 VideoDecodeAccelerator::Client* client = this; |
520 decoder_.reset(new FakeVideoDecodeAccelerator( | 589 |
521 frame_size_, base::Bind(&DoNothingReturnTrue))); | 590 scoped_ptr<media::VideoDecodeAccelerator> decoders[] = { |
522 LOG_ASSERT(decoder_->Initialize(profile_, this)); | 591 CreateFakeVDA(), |
523 } else { | 592 CreateDXVAVDA(), |
524 if (!vda_factory_) { | 593 CreateV4L2VDA(), |
525 vda_factory_ = GpuVideoDecodeAcceleratorFactoryImpl::Create( | 594 CreateV4L2SliceVDA(), |
526 base::Bind(&RenderingHelper::GetGLContext, | 595 CreateVaapiVDA(), |
527 base::Unretained(rendering_helper_)), | 596 }; |
528 base::Bind(&DoNothingReturnTrue), base::Bind(&DummyBindImage)); | 597 |
529 LOG_ASSERT(vda_factory_); | 598 for (size_t i = 0; i < arraysize(decoders); ++i) { |
| 599 if (!decoders[i]) |
| 600 continue; |
| 601 decoder_ = std::move(decoders[i]); |
| 602 weak_decoder_factory_.reset( |
| 603 new base::WeakPtrFactory<VideoDecodeAccelerator>(decoder_.get())); |
| 604 if (decoder_->Initialize(profile_, client)) { |
| 605 SetState(CS_DECODER_SET); |
| 606 FinishInitialization(); |
| 607 return; |
530 } | 608 } |
531 | |
532 VideoDecodeAccelerator::Config config(profile_); | |
533 gpu::GpuPreferences gpu_preferences; | |
534 decoder_ = vda_factory_->CreateVDA(this, config, gpu_preferences); | |
535 } | 609 } |
536 | 610 // Decoders are all initialize failed. |
537 LOG_ASSERT(decoder_) << "Failed creating a VDA"; | 611 LOG(ERROR) << "VideoDecodeAccelerator::Initialize() failed"; |
538 | 612 LOG_ASSERT(false); |
539 decoder_->TryToSetupDecodeOnSeparateThread( | |
540 weak_this_, base::ThreadTaskRunnerHandle::Get()); | |
541 | |
542 SetState(CS_DECODER_SET); | |
543 FinishInitialization(); | |
544 } | 613 } |
545 | 614 |
546 void GLRenderingVDAClient::ProvidePictureBuffers( | 615 void GLRenderingVDAClient::ProvidePictureBuffers( |
547 uint32_t requested_num_of_buffers, | 616 uint32_t requested_num_of_buffers, |
548 const gfx::Size& dimensions, | 617 const gfx::Size& dimensions, |
549 uint32_t texture_target) { | 618 uint32_t texture_target) { |
550 if (decoder_deleted()) | 619 if (decoder_deleted()) |
551 return; | 620 return; |
552 std::vector<media::PictureBuffer> buffers; | 621 std::vector<media::PictureBuffer> buffers; |
553 | 622 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 LOG_ASSERT(1U == pending_textures_.erase(picture_buffer_id)); | 706 LOG_ASSERT(1U == pending_textures_.erase(picture_buffer_id)); |
638 | 707 |
639 if (pending_textures_.empty() && state_ == CS_RESETTING) { | 708 if (pending_textures_.empty() && state_ == CS_RESETTING) { |
640 SetState(CS_RESET); | 709 SetState(CS_RESET); |
641 DeleteDecoder(); | 710 DeleteDecoder(); |
642 return; | 711 return; |
643 } | 712 } |
644 | 713 |
645 if (num_decoded_frames_ > delay_reuse_after_frame_num_) { | 714 if (num_decoded_frames_ > delay_reuse_after_frame_num_) { |
646 base::MessageLoop::current()->PostDelayedTask( | 715 base::MessageLoop::current()->PostDelayedTask( |
647 FROM_HERE, base::Bind(&VideoDecodeAccelerator::ReusePictureBuffer, | 716 FROM_HERE, |
648 weak_vda_, picture_buffer_id), | 717 base::Bind(&VideoDecodeAccelerator::ReusePictureBuffer, |
| 718 weak_decoder_factory_->GetWeakPtr(), |
| 719 picture_buffer_id), |
649 kReuseDelay); | 720 kReuseDelay); |
650 } else { | 721 } else { |
651 decoder_->ReusePictureBuffer(picture_buffer_id); | 722 decoder_->ReusePictureBuffer(picture_buffer_id); |
652 } | 723 } |
653 } | 724 } |
654 | 725 |
655 void GLRenderingVDAClient::NotifyEndOfBitstreamBuffer( | 726 void GLRenderingVDAClient::NotifyEndOfBitstreamBuffer( |
656 int32_t bitstream_buffer_id) { | 727 int32_t bitstream_buffer_id) { |
657 // TODO(fischman): this test currently relies on this notification to make | 728 // TODO(fischman): this test currently relies on this notification to make |
658 // forward progress during a Reset(). But the VDA::Reset() API doesn't | 729 // forward progress during a Reset(). But the VDA::Reset() API doesn't |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 } | 831 } |
761 | 832 |
762 for (int i = 0; i < num_in_flight_decodes_; ++i) | 833 for (int i = 0; i < num_in_flight_decodes_; ++i) |
763 DecodeNextFragment(); | 834 DecodeNextFragment(); |
764 DCHECK_EQ(outstanding_decodes_, num_in_flight_decodes_); | 835 DCHECK_EQ(outstanding_decodes_, num_in_flight_decodes_); |
765 } | 836 } |
766 | 837 |
767 void GLRenderingVDAClient::DeleteDecoder() { | 838 void GLRenderingVDAClient::DeleteDecoder() { |
768 if (decoder_deleted()) | 839 if (decoder_deleted()) |
769 return; | 840 return; |
770 weak_vda_ptr_factory_.reset(); | 841 weak_decoder_factory_.reset(); |
771 decoder_.reset(); | 842 decoder_.reset(); |
772 STLClearObject(&encoded_data_); | 843 STLClearObject(&encoded_data_); |
773 active_textures_.clear(); | 844 active_textures_.clear(); |
774 | 845 |
775 // Cascade through the rest of the states to simplify test code below. | 846 // Cascade through the rest of the states to simplify test code below. |
776 for (int i = state_ + 1; i < CS_MAX; ++i) | 847 for (int i = state_ + 1; i < CS_MAX; ++i) |
777 SetState(static_cast<ClientState>(i)); | 848 SetState(static_cast<ClientState>(i)); |
778 } | 849 } |
779 | 850 |
780 std::string GLRenderingVDAClient::GetBytesForFirstFragment( | 851 std::string GLRenderingVDAClient::GetBytesForFirstFragment( |
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1575 content::VaapiWrapper::PreSandboxInitialization(); | 1646 content::VaapiWrapper::PreSandboxInitialization(); |
1576 #endif | 1647 #endif |
1577 | 1648 |
1578 content::g_env = | 1649 content::g_env = |
1579 reinterpret_cast<content::VideoDecodeAcceleratorTestEnvironment*>( | 1650 reinterpret_cast<content::VideoDecodeAcceleratorTestEnvironment*>( |
1580 testing::AddGlobalTestEnvironment( | 1651 testing::AddGlobalTestEnvironment( |
1581 new content::VideoDecodeAcceleratorTestEnvironment())); | 1652 new content::VideoDecodeAcceleratorTestEnvironment())); |
1582 | 1653 |
1583 return RUN_ALL_TESTS(); | 1654 return RUN_ALL_TESTS(); |
1584 } | 1655 } |
OLD | NEW |