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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 bitmap->setPixelRef(pixel_ref)->unref(); | 129 bitmap->setPixelRef(pixel_ref)->unref(); |
130 return true; | 130 return true; |
131 } | 131 } |
132 | 132 |
133 class SyncTokenClientImpl : public media::VideoFrame::SyncTokenClient { | 133 class SyncTokenClientImpl : public media::VideoFrame::SyncTokenClient { |
134 public: | 134 public: |
135 explicit SyncTokenClientImpl( | 135 explicit SyncTokenClientImpl( |
136 blink::WebGraphicsContext3D* web_graphics_context) | 136 blink::WebGraphicsContext3D* web_graphics_context) |
137 : web_graphics_context_(web_graphics_context) {} | 137 : web_graphics_context_(web_graphics_context) {} |
138 ~SyncTokenClientImpl() override {} | 138 ~SyncTokenClientImpl() override {} |
139 void GenerateSyncToken(gpu::SyncToken* sync_token) override { | 139 uint32 InsertSyncPoint() override { |
140 if (!web_graphics_context_->insertSyncPoint(sync_token->GetData())) { | 140 gpu::SyncToken sync_token; |
141 sync_token->Clear(); | 141 if (!web_graphics_context_->insertSyncPoint(sync_token.GetData())) |
142 } | 142 return 0; |
| 143 return static_cast<uint32>(sync_token.release_count()); |
143 } | 144 } |
144 void WaitSyncToken(const gpu::SyncToken& sync_token) override { | 145 void WaitSyncToken(const gpu::SyncToken& sync_token) override { |
145 web_graphics_context_->waitSyncToken(sync_token.GetConstData()); | 146 web_graphics_context_->waitSyncToken(sync_token.GetConstData()); |
146 } | 147 } |
147 | 148 |
148 private: | 149 private: |
149 blink::WebGraphicsContext3D* web_graphics_context_; | 150 blink::WebGraphicsContext3D* web_graphics_context_; |
150 }; | 151 }; |
151 | 152 |
152 } // namespace | 153 } // namespace |
(...skipping 1768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1921 | 1922 |
1922 bool is_hls = IsHLSStream(); | 1923 bool is_hls = IsHLSStream(); |
1923 UMA_HISTOGRAM_BOOLEAN("Media.Android.IsHttpLiveStreamingMedia", is_hls); | 1924 UMA_HISTOGRAM_BOOLEAN("Media.Android.IsHttpLiveStreamingMedia", is_hls); |
1924 if (is_hls) { | 1925 if (is_hls) { |
1925 media::RecordOriginOfHLSPlayback( | 1926 media::RecordOriginOfHLSPlayback( |
1926 GURL(frame_->document().securityOrigin().toString())); | 1927 GURL(frame_->document().securityOrigin().toString())); |
1927 } | 1928 } |
1928 } | 1929 } |
1929 | 1930 |
1930 } // namespace content | 1931 } // namespace content |
OLD | NEW |