| 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/android/webmediaplayer_android.h" | 5 #include "content/renderer/media/android/webmediaplayer_android.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <limits> | 9 #include <limits> |
| 10 | 10 |
| (...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 706 | 706 |
| 707 // Ensure the target of texture is set before copyTextureCHROMIUM, otherwise | 707 // Ensure the target of texture is set before copyTextureCHROMIUM, otherwise |
| 708 // an invalid texture target may be used for copy texture. | 708 // an invalid texture target may be used for copy texture. |
| 709 uint32_t src_texture = web_graphics_context->createAndConsumeTextureCHROMIUM( | 709 uint32_t src_texture = web_graphics_context->createAndConsumeTextureCHROMIUM( |
| 710 mailbox_holder.texture_target, mailbox_holder.mailbox.name); | 710 mailbox_holder.texture_target, mailbox_holder.mailbox.name); |
| 711 | 711 |
| 712 // Application itself needs to take care of setting the right flip_y | 712 // Application itself needs to take care of setting the right flip_y |
| 713 // value down to get the expected result. | 713 // value down to get the expected result. |
| 714 // flip_y==true means to reverse the video orientation while | 714 // flip_y==true means to reverse the video orientation while |
| 715 // flip_y==false means to keep the intrinsic orientation. | 715 // flip_y==false means to keep the intrinsic orientation. |
| 716 web_graphics_context->copyTextureCHROMIUM( | 716 web_graphics_context->copyTextureCHROMIUM(src_texture, texture, |
| 717 GL_TEXTURE_2D, src_texture, texture, internal_format, type, | 717 internal_format, type, flip_y, |
| 718 flip_y, premultiply_alpha, false); | 718 premultiply_alpha, false); |
| 719 | 719 |
| 720 web_graphics_context->deleteTexture(src_texture); | 720 web_graphics_context->deleteTexture(src_texture); |
| 721 web_graphics_context->flush(); | 721 web_graphics_context->flush(); |
| 722 | 722 |
| 723 SyncTokenClientImpl client(web_graphics_context); | 723 SyncTokenClientImpl client(web_graphics_context); |
| 724 video_frame->UpdateReleaseSyncToken(&client); | 724 video_frame->UpdateReleaseSyncToken(&client); |
| 725 return true; | 725 return true; |
| 726 } | 726 } |
| 727 | 727 |
| 728 bool WebMediaPlayerAndroid::hasSingleSecurityOrigin() const { | 728 bool WebMediaPlayerAndroid::hasSingleSecurityOrigin() const { |
| (...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1974 result = PREDICTION_RESULT_PATH_BASED_WAS_BETTER; | 1974 result = PREDICTION_RESULT_PATH_BASED_WAS_BETTER; |
| 1975 } else if (is_hls_url == is_hls) { | 1975 } else if (is_hls_url == is_hls) { |
| 1976 result = PREDICTION_RESULT_URL_BASED_WAS_BETTER; | 1976 result = PREDICTION_RESULT_URL_BASED_WAS_BETTER; |
| 1977 } | 1977 } |
| 1978 UMA_HISTOGRAM_ENUMERATION( | 1978 UMA_HISTOGRAM_ENUMERATION( |
| 1979 "Media.Android.IsHttpLiveStreamingMediaPredictionResult", | 1979 "Media.Android.IsHttpLiveStreamingMediaPredictionResult", |
| 1980 result, PREDICTION_RESULT_MAX); | 1980 result, PREDICTION_RESULT_MAX); |
| 1981 } | 1981 } |
| 1982 | 1982 |
| 1983 } // namespace content | 1983 } // namespace content |
| OLD | NEW |