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

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

Issue 175223003: HW Video: Make media::VideoFrame handle the sync point of the compositor as well as webgl (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Make GpuVideoAcceleratorFactories::ReadPixels() receive mailbox, instead of texture 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
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 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
1322 1323
1323 if (web_cdm_) { 1324 if (web_cdm_) {
1324 decryptor_ready_cb.Run(web_cdm_->GetDecryptor()); 1325 decryptor_ready_cb.Run(web_cdm_->GetDecryptor());
1325 return; 1326 return;
1326 } 1327 }
1327 1328
1328 decryptor_ready_cb_ = decryptor_ready_cb; 1329 decryptor_ready_cb_ = decryptor_ready_cb;
1329 } 1330 }
1330 1331
1331 } // namespace content 1332 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698