| 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 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 | 766 |
| 767 for (int i = 0; i < num_in_flight_decodes_; ++i) | 767 for (int i = 0; i < num_in_flight_decodes_; ++i) |
| 768 DecodeNextFragment(); | 768 DecodeNextFragment(); |
| 769 DCHECK_EQ(outstanding_decodes_, num_in_flight_decodes_); | 769 DCHECK_EQ(outstanding_decodes_, num_in_flight_decodes_); |
| 770 } | 770 } |
| 771 | 771 |
| 772 void GLRenderingVDAClient::DeleteDecoder() { | 772 void GLRenderingVDAClient::DeleteDecoder() { |
| 773 if (decoder_deleted()) | 773 if (decoder_deleted()) |
| 774 return; | 774 return; |
| 775 weak_decoder_factory_.reset(); | 775 weak_decoder_factory_.reset(); |
| 776 decoder_.release()->Destroy(); | 776 decoder_.reset(); |
| 777 STLClearObject(&encoded_data_); | 777 STLClearObject(&encoded_data_); |
| 778 for (std::set<int>::iterator it = outstanding_texture_ids_.begin(); | 778 for (std::set<int>::iterator it = outstanding_texture_ids_.begin(); |
| 779 it != outstanding_texture_ids_.end(); ++it) { | 779 it != outstanding_texture_ids_.end(); ++it) { |
| 780 rendering_helper_->DeleteTexture(*it); | 780 rendering_helper_->DeleteTexture(*it); |
| 781 } | 781 } |
| 782 outstanding_texture_ids_.clear(); | 782 outstanding_texture_ids_.clear(); |
| 783 // Cascade through the rest of the states to simplify test code below. | 783 // Cascade through the rest of the states to simplify test code below. |
| 784 for (int i = state_ + 1; i < CS_MAX; ++i) | 784 for (int i = state_ + 1; i < CS_MAX; ++i) |
| 785 SetState(static_cast<ClientState>(i)); | 785 SetState(static_cast<ClientState>(i)); |
| 786 } | 786 } |
| (...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1567 } | 1567 } |
| 1568 if (it->first == "v" || it->first == "vmodule") | 1568 if (it->first == "v" || it->first == "vmodule") |
| 1569 continue; | 1569 continue; |
| 1570 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; | 1570 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; |
| 1571 } | 1571 } |
| 1572 | 1572 |
| 1573 base::ShadowingAtExitManager at_exit_manager; | 1573 base::ShadowingAtExitManager at_exit_manager; |
| 1574 | 1574 |
| 1575 return RUN_ALL_TESTS(); | 1575 return RUN_ALL_TESTS(); |
| 1576 } | 1576 } |
| OLD | NEW |