| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "content/renderer/media/webmediaplayer_impl.h" | 5 #include "content/renderer/media/webmediaplayer_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 false); | 676 false); |
| 677 | 677 |
| 678 // Restore the state for TEXTURE_2D binding point as mentioned above. | 678 // Restore the state for TEXTURE_2D binding point as mentioned above. |
| 679 web_graphics_context->bindTexture(GL_TEXTURE_2D, texture); | 679 web_graphics_context->bindTexture(GL_TEXTURE_2D, texture); |
| 680 | 680 |
| 681 web_graphics_context->deleteTexture(source_texture); | 681 web_graphics_context->deleteTexture(source_texture); |
| 682 | 682 |
| 683 // The flush() operation is not necessary here. It is kept since the | 683 // The flush() operation is not necessary here. It is kept since the |
| 684 // performance will be better when it is added than not. | 684 // performance will be better when it is added than not. |
| 685 web_graphics_context->flush(); | 685 web_graphics_context->flush(); |
| 686 video_frame->AppendReleaseSyncPoint(web_graphics_context->insertSyncPoint()); |
| 686 return true; | 687 return true; |
| 687 } | 688 } |
| 688 | 689 |
| 689 // Helper functions to report media EME related stats to UMA. They follow the | 690 // Helper functions to report media EME related stats to UMA. They follow the |
| 690 // convention of more commonly used macros UMA_HISTOGRAM_ENUMERATION and | 691 // convention of more commonly used macros UMA_HISTOGRAM_ENUMERATION and |
| 691 // UMA_HISTOGRAM_COUNTS. The reason that we cannot use those macros directly is | 692 // UMA_HISTOGRAM_COUNTS. The reason that we cannot use those macros directly is |
| 692 // that UMA_* macros require the names to be constant throughout the process' | 693 // that UMA_* macros require the names to be constant throughout the process' |
| 693 // lifetime. | 694 // lifetime. |
| 694 static void EmeUMAHistogramEnumeration(const std::string& key_system, | 695 static void EmeUMAHistogramEnumeration(const std::string& key_system, |
| 695 const std::string& method, | 696 const std::string& method, |
| (...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1316 | 1317 |
| 1317 if (web_cdm_) { | 1318 if (web_cdm_) { |
| 1318 decryptor_ready_cb.Run(web_cdm_->GetDecryptor()); | 1319 decryptor_ready_cb.Run(web_cdm_->GetDecryptor()); |
| 1319 return; | 1320 return; |
| 1320 } | 1321 } |
| 1321 | 1322 |
| 1322 decryptor_ready_cb_ = decryptor_ready_cb; | 1323 decryptor_ready_cb_ = decryptor_ready_cb; |
| 1323 } | 1324 } |
| 1324 | 1325 |
| 1325 } // namespace content | 1326 } // namespace content |
| OLD | NEW |