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 <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/android/build_info.h" | 9 #include "base/android/build_info.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 using media::VideoFrame; | 80 using media::VideoFrame; |
81 | 81 |
82 namespace { | 82 namespace { |
83 // Prefix for histograms related to Encrypted Media Extensions. | 83 // Prefix for histograms related to Encrypted Media Extensions. |
84 const char* kMediaEme = "Media.EME."; | 84 const char* kMediaEme = "Media.EME."; |
85 | 85 |
86 // File-static function is to allow it to run even after WMPA is deleted. | 86 // File-static function is to allow it to run even after WMPA is deleted. |
87 void OnReleaseTexture( | 87 void OnReleaseTexture( |
88 const scoped_refptr<content::StreamTextureFactory>& factories, | 88 const scoped_refptr<content::StreamTextureFactory>& factories, |
89 uint32 texture_id, | 89 uint32 texture_id, |
90 uint32 release_sync_point) { | 90 uint32 release_sync_point, |
| 91 const gpu::SyncToken& sync_token) { |
91 GLES2Interface* gl = factories->ContextGL(); | 92 GLES2Interface* gl = factories->ContextGL(); |
92 gl->WaitSyncPointCHROMIUM(release_sync_point); | 93 gl->WaitSyncPointCHROMIUM(release_sync_point, sync_token.GetConstData()); |
93 gl->DeleteTextures(1, &texture_id); | 94 gl->DeleteTextures(1, &texture_id); |
94 // Flush to ensure that the stream texture gets deleted in a timely fashion. | 95 // Flush to ensure that the stream texture gets deleted in a timely fashion. |
95 gl->ShallowFlushCHROMIUM(); | 96 gl->ShallowFlushCHROMIUM(); |
96 } | 97 } |
97 | 98 |
98 bool IsSkBitmapProperlySizedTexture(const SkBitmap* bitmap, | 99 bool IsSkBitmapProperlySizedTexture(const SkBitmap* bitmap, |
99 const gfx::Size& size) { | 100 const gfx::Size& size) { |
100 return bitmap->getTexture() && bitmap->width() == size.width() && | 101 return bitmap->getTexture() && bitmap->width() == size.width() && |
101 bitmap->height() == size.height(); | 102 bitmap->height() == size.height(); |
102 } | 103 } |
(...skipping 1812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1915 | 1916 |
1916 bool is_hls = IsHLSStream(); | 1917 bool is_hls = IsHLSStream(); |
1917 UMA_HISTOGRAM_BOOLEAN("Media.Android.IsHttpLiveStreamingMedia", is_hls); | 1918 UMA_HISTOGRAM_BOOLEAN("Media.Android.IsHttpLiveStreamingMedia", is_hls); |
1918 if (is_hls) { | 1919 if (is_hls) { |
1919 media::RecordOriginOfHLSPlayback( | 1920 media::RecordOriginOfHLSPlayback( |
1920 GURL(frame_->document().securityOrigin().toString())); | 1921 GURL(frame_->document().securityOrigin().toString())); |
1921 } | 1922 } |
1922 } | 1923 } |
1923 | 1924 |
1924 } // namespace content | 1925 } // namespace content |
OLD | NEW |