Chromium Code Reviews| 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 web_graphics_context->pixelStorei(GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM, | 676 web_graphics_context->pixelStorei(GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM, |
| 677 false); | 677 false); |
| 678 | 678 |
| 679 // Restore the state for TEXTURE_2D binding point as mentioned above. | 679 // Restore the state for TEXTURE_2D binding point as mentioned above. |
| 680 web_graphics_context->bindTexture(GL_TEXTURE_2D, texture); | 680 web_graphics_context->bindTexture(GL_TEXTURE_2D, texture); |
| 681 | 681 |
| 682 web_graphics_context->deleteTexture(source_texture); | 682 web_graphics_context->deleteTexture(source_texture); |
| 683 | 683 |
| 684 // The flush() operation is not necessary here. It is kept since the | 684 // The flush() operation is not necessary here. It is kept since the |
| 685 // performance will be better when it is added than not. | 685 // performance will be better when it is added than not. |
| 686 web_graphics_context->flush(); | 686 web_graphics_context->flush(); |
|
danakj
2014/04/11 16:23:28
I wonder if this flush was trying to deal with thi
dshwang
2014/04/11 17:55:37
This flush is logically needed because we want to
| |
| 687 video_frame->AppendReleaseSyncPoint(web_graphics_context->insertSyncPoint()); | |
|
dshwang
2014/03/20 08:53:24
sievers@, I didnot add this line to webmediaplayer
| |
| 687 return true; | 688 return true; |
| 688 } | 689 } |
| 689 | 690 |
| 690 // Helper functions to report media EME related stats to UMA. They follow the | 691 // Helper functions to report media EME related stats to UMA. They follow the |
| 691 // convention of more commonly used macros UMA_HISTOGRAM_ENUMERATION and | 692 // convention of more commonly used macros UMA_HISTOGRAM_ENUMERATION and |
| 692 // UMA_HISTOGRAM_COUNTS. The reason that we cannot use those macros directly is | 693 // UMA_HISTOGRAM_COUNTS. The reason that we cannot use those macros directly is |
| 693 // that UMA_* macros require the names to be constant throughout the process' | 694 // that UMA_* macros require the names to be constant throughout the process' |
| 694 // lifetime. | 695 // lifetime. |
| 695 static void EmeUMAHistogramEnumeration(const std::string& key_system, | 696 static void EmeUMAHistogramEnumeration(const std::string& key_system, |
| 696 const std::string& method, | 697 const std::string& method, |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1323 | 1324 |
| 1324 if (web_cdm_) { | 1325 if (web_cdm_) { |
| 1325 decryptor_ready_cb.Run(web_cdm_->GetDecryptor()); | 1326 decryptor_ready_cb.Run(web_cdm_->GetDecryptor()); |
| 1326 return; | 1327 return; |
| 1327 } | 1328 } |
| 1328 | 1329 |
| 1329 decryptor_ready_cb_ = decryptor_ready_cb; | 1330 decryptor_ready_cb_ = decryptor_ready_cb; |
| 1330 } | 1331 } |
| 1331 | 1332 |
| 1332 } // namespace content | 1333 } // namespace content |
| OLD | NEW |