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