| 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 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 type); | 671 type); |
| 672 web_graphics_context->pixelStorei(GL_UNPACK_FLIP_Y_CHROMIUM, false); | 672 web_graphics_context->pixelStorei(GL_UNPACK_FLIP_Y_CHROMIUM, false); |
| 673 web_graphics_context->pixelStorei(GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM, | 673 web_graphics_context->pixelStorei(GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM, |
| 674 false); | 674 false); |
| 675 | 675 |
| 676 // Restore the state for TEXTURE_2D binding point as mentioned above. | 676 // Restore the state for TEXTURE_2D binding point as mentioned above. |
| 677 web_graphics_context->bindTexture(GL_TEXTURE_2D, texture); | 677 web_graphics_context->bindTexture(GL_TEXTURE_2D, texture); |
| 678 | 678 |
| 679 web_graphics_context->deleteTexture(source_texture); | 679 web_graphics_context->deleteTexture(source_texture); |
| 680 web_graphics_context->flush(); | 680 web_graphics_context->flush(); |
| 681 video_frame->AppendReleaseSyncPoint(web_graphics_context->insertSyncPoint()); | 681 |
| 682 std::ostringstream convert; |
| 683 convert << "blink_" << web_graphics_context; |
| 684 video_frame->AppendReleaseSyncPoint(convert.str(), |
| 685 web_graphics_context->insertSyncPoint()); |
| 682 return true; | 686 return true; |
| 683 } | 687 } |
| 684 | 688 |
| 685 // Helper functions to report media EME related stats to UMA. They follow the | 689 // Helper functions to report media EME related stats to UMA. They follow the |
| 686 // convention of more commonly used macros UMA_HISTOGRAM_ENUMERATION and | 690 // convention of more commonly used macros UMA_HISTOGRAM_ENUMERATION and |
| 687 // UMA_HISTOGRAM_COUNTS. The reason that we cannot use those macros directly is | 691 // UMA_HISTOGRAM_COUNTS. The reason that we cannot use those macros directly is |
| 688 // that UMA_* macros require the names to be constant throughout the process' | 692 // that UMA_* macros require the names to be constant throughout the process' |
| 689 // lifetime. | 693 // lifetime. |
| 690 static void EmeUMAHistogramEnumeration(const std::string& key_system, | 694 static void EmeUMAHistogramEnumeration(const std::string& key_system, |
| 691 const std::string& method, | 695 const std::string& method, |
| (...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1375 compositor_task_runner_->PostTask(FROM_HERE, | 1379 compositor_task_runner_->PostTask(FROM_HERE, |
| 1376 base::Bind(&GetCurrentFrameAndSignal, | 1380 base::Bind(&GetCurrentFrameAndSignal, |
| 1377 base::Unretained(compositor_), | 1381 base::Unretained(compositor_), |
| 1378 &video_frame, | 1382 &video_frame, |
| 1379 &event)); | 1383 &event)); |
| 1380 event.Wait(); | 1384 event.Wait(); |
| 1381 return video_frame; | 1385 return video_frame; |
| 1382 } | 1386 } |
| 1383 | 1387 |
| 1384 } // namespace content | 1388 } // namespace content |
| OLD | NEW |