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

Side by Side Diff: content/browser/media/capture/desktop_capture_device_aura.cc

Issue 312803002: Android media: VideoFrame should not store so many sync points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android unittests build fix Created 6 years, 5 months 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 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/browser/media/capture/desktop_capture_device_aura.h" 5 #include "content/browser/media/capture/desktop_capture_device_aura.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/timer/timer.h" 9 #include "base/timer/timer.h"
10 #include "cc/output/copy_output_request.h" 10 #include "cc/output/copy_output_request.h"
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 const gfx::Point& cursor_position, 289 const gfx::Point& cursor_position,
290 scoped_ptr<cc::SingleReleaseCallback> release_callback, 290 scoped_ptr<cc::SingleReleaseCallback> release_callback,
291 bool result) { 291 bool result) {
292 if (!cursor_bitmap.isNull()) 292 if (!cursor_bitmap.isNull())
293 RenderCursorOnVideoFrame(target, cursor_bitmap, cursor_position); 293 RenderCursorOnVideoFrame(target, cursor_bitmap, cursor_position);
294 release_callback->Run(0, false); 294 release_callback->Run(0, false);
295 capture_frame_cb.Run(target, start_time, result); 295 capture_frame_cb.Run(target, start_time, result);
296 } 296 }
297 297
298 void RunSingleReleaseCallback(scoped_ptr<cc::SingleReleaseCallback> cb, 298 void RunSingleReleaseCallback(scoped_ptr<cc::SingleReleaseCallback> cb,
299 const std::vector<uint32>& sync_points) { 299 uint32 sync_point) {
300 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 300 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
301 GLHelper* gl_helper = ImageTransportFactory::GetInstance()->GetGLHelper(); 301 cb->Run(sync_point, false);
no sievers 2014/07/10 18:52:29 maybe remove this function since it doesn't do any
dshwang 2014/07/10 19:23:11 you're right. I'll update.
302 DCHECK(gl_helper);
303 for (unsigned i = 0; i < sync_points.size(); i++)
304 gl_helper->WaitSyncPoint(sync_points[i]);
305 uint32 new_sync_point = gl_helper->InsertSyncPoint();
306 cb->Run(new_sync_point, false);
307 } 302 }
308 303
309 void DesktopVideoCaptureMachine::DidCopyOutput( 304 void DesktopVideoCaptureMachine::DidCopyOutput(
310 scoped_refptr<media::VideoFrame> video_frame, 305 scoped_refptr<media::VideoFrame> video_frame,
311 base::TimeTicks start_time, 306 base::TimeTicks start_time,
312 const ThreadSafeCaptureOracle::CaptureFrameCallback& capture_frame_cb, 307 const ThreadSafeCaptureOracle::CaptureFrameCallback& capture_frame_cb,
313 scoped_ptr<cc::CopyOutputResult> result) { 308 scoped_ptr<cc::CopyOutputResult> result) {
314 static bool first_call = true; 309 static bool first_call = true;
315 310
316 bool succeeded = ProcessCopyOutputResponse( 311 bool succeeded = ProcessCopyOutputResponse(
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 scoped_ptr<Client> client) { 527 scoped_ptr<Client> client) {
533 DVLOG(1) << "Allocating " << params.requested_format.frame_size.ToString(); 528 DVLOG(1) << "Allocating " << params.requested_format.frame_size.ToString();
534 core_->AllocateAndStart(params, client.Pass()); 529 core_->AllocateAndStart(params, client.Pass());
535 } 530 }
536 531
537 void DesktopCaptureDeviceAura::StopAndDeAllocate() { 532 void DesktopCaptureDeviceAura::StopAndDeAllocate() {
538 core_->StopAndDeAllocate(); 533 core_->StopAndDeAllocate();
539 } 534 }
540 535
541 } // namespace content 536 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698