Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: content/renderer/media/webmediaplayer_impl.cc

Issue 200763011: Add explicit flush after copyTextureCHROMIUM to make the change visible accross contexts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove the unnecessary flush() Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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.
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
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
OLDNEW
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698