Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Side by Side Diff: content/browser/renderer_host/media/video_capture_controller.cc

Issue 1414793018: Revert of Converted video frame and image callbacks to use new sync tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 void GenerateSyncToken(gpu::SyncToken* sync_token) override { 48 uint32 InsertSyncPoint() override { return gl_helper_->InsertSyncPoint(); }
49 gl_helper_->GenerateSyncToken(sync_token);
50 }
51 void WaitSyncToken(const gpu::SyncToken& sync_token) override { 49 void WaitSyncToken(const gpu::SyncToken& sync_token) override {
52 gl_helper_->WaitSyncToken(sync_token); 50 gl_helper_->WaitSyncToken(sync_token);
53 } 51 }
54 52
55 private: 53 private:
56 GLHelper* gl_helper_; 54 GLHelper* gl_helper_;
57 }; 55 };
58 56
59 void ReturnVideoFrame(const scoped_refptr<VideoFrame>& video_frame, 57 void ReturnVideoFrame(const scoped_refptr<VideoFrame>& video_frame,
60 const gpu::SyncToken& sync_token) { 58 const gpu::SyncToken& sync_token) {
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 int session_id, 469 int session_id,
472 const ControllerClients& clients) { 470 const ControllerClients& clients) {
473 for (auto client : clients) { 471 for (auto client : clients) {
474 if (client->session_id == session_id) 472 if (client->session_id == session_id)
475 return client; 473 return client;
476 } 474 }
477 return NULL; 475 return NULL;
478 } 476 }
479 477
480 } // namespace content 478 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | content/browser/renderer_host/render_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698