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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
673 internal_format, | 673 internal_format, |
674 type); | 674 type); |
675 web_graphics_context->pixelStorei(GL_UNPACK_FLIP_Y_CHROMIUM, false); | 675 web_graphics_context->pixelStorei(GL_UNPACK_FLIP_Y_CHROMIUM, false); |
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 | |
684 // The flush() operation is not necessary here. It is kept since the | |
685 // performance will be better when it is added than not. | |
no sievers
2014/03/19 17:02:19
Why remove this comment though? Does it not apply
junj
2014/03/20 02:39:34
The performance(FPS) seems still better on win7 wi
| |
686 web_graphics_context->flush(); | 683 web_graphics_context->flush(); |
687 return true; | 684 return true; |
688 } | 685 } |
689 | 686 |
690 // Helper functions to report media EME related stats to UMA. They follow the | 687 // Helper functions to report media EME related stats to UMA. They follow the |
691 // convention of more commonly used macros UMA_HISTOGRAM_ENUMERATION and | 688 // convention of more commonly used macros UMA_HISTOGRAM_ENUMERATION and |
692 // UMA_HISTOGRAM_COUNTS. The reason that we cannot use those macros directly is | 689 // 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' | 690 // that UMA_* macros require the names to be constant throughout the process' |
694 // lifetime. | 691 // lifetime. |
695 static void EmeUMAHistogramEnumeration(const std::string& key_system, | 692 static void EmeUMAHistogramEnumeration(const std::string& key_system, |
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1323 | 1320 |
1324 if (web_cdm_) { | 1321 if (web_cdm_) { |
1325 decryptor_ready_cb.Run(web_cdm_->GetDecryptor()); | 1322 decryptor_ready_cb.Run(web_cdm_->GetDecryptor()); |
1326 return; | 1323 return; |
1327 } | 1324 } |
1328 | 1325 |
1329 decryptor_ready_cb_ = decryptor_ready_cb; | 1326 decryptor_ready_cb_ = decryptor_ready_cb; |
1330 } | 1327 } |
1331 | 1328 |
1332 } // namespace content | 1329 } // namespace content |
OLD | NEW |