| 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 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1189 client_->repaint(); | 1189 client_->repaint(); |
| 1190 } | 1190 } |
| 1191 #else | 1191 #else |
| 1192 NOTIMPLEMENTED() << "Hole punching not supported without VIDEO_HOLE flag"; | 1192 NOTIMPLEMENTED() << "Hole punching not supported without VIDEO_HOLE flag"; |
| 1193 #endif // defined(VIDEO_HOLE) | 1193 #endif // defined(VIDEO_HOLE) |
| 1194 } else if (!is_remote_ && texture_id_) { | 1194 } else if (!is_remote_ && texture_id_) { |
| 1195 GLES2Interface* gl = stream_texture_factory_->ContextGL(); | 1195 GLES2Interface* gl = stream_texture_factory_->ContextGL(); |
| 1196 GLuint texture_target = kGLTextureExternalOES; | 1196 GLuint texture_target = kGLTextureExternalOES; |
| 1197 GLuint texture_id_ref = gl->CreateAndConsumeTextureCHROMIUM( | 1197 GLuint texture_id_ref = gl->CreateAndConsumeTextureCHROMIUM( |
| 1198 texture_target, texture_mailbox_.name); | 1198 texture_target, texture_mailbox_.name); |
| 1199 const GLuint64 fence_sync = gl->InsertFenceSyncCHROMIUM(); |
| 1199 gl->Flush(); | 1200 gl->Flush(); |
| 1200 gpu::SyncToken texture_mailbox_sync_token(gl->InsertSyncPointCHROMIUM()); | 1201 |
| 1202 gpu::SyncToken texture_mailbox_sync_token; |
| 1203 gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, |
| 1204 texture_mailbox_sync_token.GetData()); |
| 1201 | 1205 |
| 1202 scoped_refptr<VideoFrame> new_frame = VideoFrame::WrapNativeTexture( | 1206 scoped_refptr<VideoFrame> new_frame = VideoFrame::WrapNativeTexture( |
| 1203 media::PIXEL_FORMAT_ARGB, | 1207 media::PIXEL_FORMAT_ARGB, |
| 1204 gpu::MailboxHolder(texture_mailbox_, texture_mailbox_sync_token, | 1208 gpu::MailboxHolder(texture_mailbox_, texture_mailbox_sync_token, |
| 1205 texture_target), | 1209 texture_target), |
| 1206 media::BindToCurrentLoop(base::Bind( | 1210 media::BindToCurrentLoop(base::Bind( |
| 1207 &OnReleaseTexture, stream_texture_factory_, texture_id_ref)), | 1211 &OnReleaseTexture, stream_texture_factory_, texture_id_ref)), |
| 1208 natural_size_, gfx::Rect(natural_size_), natural_size_, | 1212 natural_size_, gfx::Rect(natural_size_), natural_size_, |
| 1209 base::TimeDelta()); | 1213 base::TimeDelta()); |
| 1210 SetCurrentFrameInternal(new_frame); | 1214 SetCurrentFrameInternal(new_frame); |
| (...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1867 result = PREDICTION_RESULT_PATH_BASED_WAS_BETTER; | 1871 result = PREDICTION_RESULT_PATH_BASED_WAS_BETTER; |
| 1868 } else if (is_hls_url == is_hls) { | 1872 } else if (is_hls_url == is_hls) { |
| 1869 result = PREDICTION_RESULT_URL_BASED_WAS_BETTER; | 1873 result = PREDICTION_RESULT_URL_BASED_WAS_BETTER; |
| 1870 } | 1874 } |
| 1871 UMA_HISTOGRAM_ENUMERATION( | 1875 UMA_HISTOGRAM_ENUMERATION( |
| 1872 "Media.Android.IsHttpLiveStreamingMediaPredictionResult", | 1876 "Media.Android.IsHttpLiveStreamingMediaPredictionResult", |
| 1873 result, PREDICTION_RESULT_MAX); | 1877 result, PREDICTION_RESULT_MAX); |
| 1874 } | 1878 } |
| 1875 | 1879 |
| 1876 } // namespace content | 1880 } // namespace content |
| OLD | NEW |