Chromium Code Reviews| 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 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 539 } | 539 } |
| 540 | 540 |
| 541 void GLRenderingVDAClient::NotifyEndOfBitstreamBuffer( | 541 void GLRenderingVDAClient::NotifyEndOfBitstreamBuffer( |
| 542 int32 bitstream_buffer_id) { | 542 int32 bitstream_buffer_id) { |
| 543 // TODO(fischman): this test currently relies on this notification to make | 543 // TODO(fischman): this test currently relies on this notification to make |
| 544 // forward progress during a Reset(). But the VDA::Reset() API doesn't | 544 // forward progress during a Reset(). But the VDA::Reset() API doesn't |
| 545 // guarantee this, so stop relying on it (and remove the notifications from | 545 // guarantee this, so stop relying on it (and remove the notifications from |
| 546 // VaapiVideoDecodeAccelerator::FinishReset()). | 546 // VaapiVideoDecodeAccelerator::FinishReset()). |
| 547 ++num_done_bitstream_buffers_; | 547 ++num_done_bitstream_buffers_; |
| 548 --outstanding_decodes_; | 548 --outstanding_decodes_; |
| 549 if (decode_calls_per_second_ == 0) | 549 if (decode_calls_per_second_ == 0 |
| 550 // when decode speed is slow, a BitstreamBuffer is released after the | |
|
Alexei Svitkine (slow)
2014/12/09 14:27:35
Nit: Comments should be full sentences.
| |
| 551 // EOS-DecodeNextFragment(), | |
| 552 // trigger DecodeNextFragment again (it will flush decode) | |
| 553 || (encoded_data_next_pos_to_decode_ == encoded_data_.size() | |
|
Alexei Svitkine (slow)
2014/12/09 14:27:36
Nit: When wrapping, operators (e.g. || and &&) sho
| |
| 554 && outstanding_decodes_ == 0)) | |
| 550 DecodeNextFragment(); | 555 DecodeNextFragment(); |
| 551 } | 556 } |
| 552 | 557 |
| 553 void GLRenderingVDAClient::NotifyFlushDone() { | 558 void GLRenderingVDAClient::NotifyFlushDone() { |
| 554 if (decoder_deleted()) | 559 if (decoder_deleted()) |
| 555 return; | 560 return; |
| 556 | 561 |
| 557 SetState(CS_FLUSHED); | 562 SetState(CS_FLUSHED); |
| 558 --remaining_play_throughs_; | 563 --remaining_play_throughs_; |
| 559 DCHECK_GE(remaining_play_throughs_, 0); | 564 DCHECK_GE(remaining_play_throughs_, 0); |
| (...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1439 if (it->first == "v" || it->first == "vmodule") | 1444 if (it->first == "v" || it->first == "vmodule") |
| 1440 continue; | 1445 continue; |
| 1441 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; | 1446 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; |
| 1442 } | 1447 } |
| 1443 | 1448 |
| 1444 base::ShadowingAtExitManager at_exit_manager; | 1449 base::ShadowingAtExitManager at_exit_manager; |
| 1445 content::RenderingHelper::InitializeOneOff(); | 1450 content::RenderingHelper::InitializeOneOff(); |
| 1446 | 1451 |
| 1447 return RUN_ALL_TESTS(); | 1452 return RUN_ALL_TESTS(); |
| 1448 } | 1453 } |
| OLD | NEW |