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

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

Issue 132233041: Add gpu::MailboxHolder to hold state for a gpu::Mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ff7262fa Rebase. Created 6 years, 10 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 | Annotate | Revision Log
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/renderer_host/media/desktop_capture_device_aura.h" 5 #include "content/browser/renderer_host/media/desktop_capture_device_aura.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/timer/timer.h" 8 #include "base/timer/timer.h"
9 #include "cc/output/copy_output_request.h" 9 #include "cc/output/copy_output_request.h"
10 #include "cc/output/copy_output_result.h" 10 #include "cc/output/copy_output_result.h"
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 result_rect.size(), 336 result_rect.size(),
337 result_rect, 337 result_rect,
338 video_frame->coded_size(), 338 video_frame->coded_size(),
339 region_in_frame, 339 region_in_frame,
340 true, 340 true,
341 true)); 341 true));
342 } 342 }
343 343
344 gfx::Point cursor_position_in_frame = UpdateCursorState(region_in_frame); 344 gfx::Point cursor_position_in_frame = UpdateCursorState(region_in_frame);
345 yuv_readback_pipeline_->ReadbackYUV( 345 yuv_readback_pipeline_->ReadbackYUV(
346 texture_mailbox.name(), texture_mailbox.sync_point(), video_frame.get(), 346 texture_mailbox.mailbox(),
347 base::Bind(&CopyOutputFinishedForVideo, start_time, capture_frame_cb, 347 texture_mailbox.sync_point(),
348 video_frame, scaled_cursor_bitmap_, cursor_position_in_frame, 348 video_frame.get(),
349 base::Bind(&CopyOutputFinishedForVideo,
350 start_time,
351 capture_frame_cb,
352 video_frame,
353 scaled_cursor_bitmap_,
354 cursor_position_in_frame,
349 base::Passed(&release_callback))); 355 base::Passed(&release_callback)));
350 } 356 }
351 357
352 gfx::Point DesktopVideoCaptureMachine::UpdateCursorState( 358 gfx::Point DesktopVideoCaptureMachine::UpdateCursorState(
353 const gfx::Rect& region_in_frame) { 359 const gfx::Rect& region_in_frame) {
354 const gfx::Rect desktop_bounds = desktop_layer_->bounds(); 360 const gfx::Rect desktop_bounds = desktop_layer_->bounds();
355 gfx::NativeCursor cursor = desktop_window_->GetDispatcher()->last_cursor(); 361 gfx::NativeCursor cursor = desktop_window_->GetDispatcher()->last_cursor();
356 if (last_cursor_ != cursor) { 362 if (last_cursor_ != cursor) {
357 SkBitmap cursor_bitmap; 363 SkBitmap cursor_bitmap;
358 if (ui::GetCursorBitmap(cursor, &cursor_bitmap, &cursor_hot_point_)) { 364 if (ui::GetCursorBitmap(cursor, &cursor_bitmap, &cursor_hot_point_)) {
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 scoped_ptr<Client> client) { 442 scoped_ptr<Client> client) {
437 DVLOG(1) << "Allocating " << params.requested_format.frame_size.ToString(); 443 DVLOG(1) << "Allocating " << params.requested_format.frame_size.ToString();
438 impl_->AllocateAndStart(params, client.Pass()); 444 impl_->AllocateAndStart(params, client.Pass());
439 } 445 }
440 446
441 void DesktopCaptureDeviceAura::StopAndDeAllocate() { 447 void DesktopCaptureDeviceAura::StopAndDeAllocate() {
442 impl_->StopAndDeAllocate(); 448 impl_->StopAndDeAllocate();
443 } 449 }
444 450
445 } // namespace content 451 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/compositor/owned_mailbox.cc ('k') | content/browser/renderer_host/render_widget_host_view_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698