OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/renderer_host/media/video_capture_controller.h" | 5 #include "content/browser/renderer_host/media/video_capture_controller.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 #define UMA_HISTOGRAM_ASPECT_RATIO(name, width, height) \ | 39 #define UMA_HISTOGRAM_ASPECT_RATIO(name, width, height) \ |
40 UMA_HISTOGRAM_SPARSE_SLOWLY( \ | 40 UMA_HISTOGRAM_SPARSE_SLOWLY( \ |
41 name, \ | 41 name, \ |
42 (height) ? ((width) * 100) / (height) : kInfiniteRatio); | 42 (height) ? ((width) * 100) / (height) : kInfiniteRatio); |
43 | 43 |
44 class SyncTokenClientImpl : public VideoFrame::SyncTokenClient { | 44 class SyncTokenClientImpl : public VideoFrame::SyncTokenClient { |
45 public: | 45 public: |
46 explicit SyncTokenClientImpl(GLHelper* gl_helper) : gl_helper_(gl_helper) {} | 46 explicit SyncTokenClientImpl(GLHelper* gl_helper) : gl_helper_(gl_helper) {} |
47 ~SyncTokenClientImpl() override {} | 47 ~SyncTokenClientImpl() override {} |
48 uint32 InsertSyncPoint() override { return gl_helper_->InsertSyncPoint(); } | 48 void GenerateSyncToken(gpu::SyncToken* sync_token) override { |
| 49 gl_helper_->GenerateSyncToken(sync_token); |
| 50 } |
49 void WaitSyncToken(const gpu::SyncToken& sync_token) override { | 51 void WaitSyncToken(const gpu::SyncToken& sync_token) override { |
50 gl_helper_->WaitSyncToken(sync_token); | 52 gl_helper_->WaitSyncToken(sync_token); |
51 } | 53 } |
52 | 54 |
53 private: | 55 private: |
54 GLHelper* gl_helper_; | 56 GLHelper* gl_helper_; |
55 }; | 57 }; |
56 | 58 |
57 void ReturnVideoFrame(const scoped_refptr<VideoFrame>& video_frame, | 59 void ReturnVideoFrame(const scoped_refptr<VideoFrame>& video_frame, |
58 const gpu::SyncToken& sync_token) { | 60 const gpu::SyncToken& sync_token) { |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 int session_id, | 471 int session_id, |
470 const ControllerClients& clients) { | 472 const ControllerClients& clients) { |
471 for (auto client : clients) { | 473 for (auto client : clients) { |
472 if (client->session_id == session_id) | 474 if (client->session_id == session_id) |
473 return client; | 475 return client; |
474 } | 476 } |
475 return NULL; | 477 return NULL; |
476 } | 478 } |
477 | 479 |
478 } // namespace content | 480 } // namespace content |
OLD | NEW |