forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tab Capture: Backing store readbacks to YV12 VideoFrames.
Goal here is performance; in tab capture there are significant benefits to doing the readback as YV12: it's less data to copy back, and it's cheap to do on the GPU. VideoFrame is used because it's the most capable YV12 container. [render_widget_host.h] Add a new flavor of CopyFromBackingStore, called CopyFromBackingStoreToVideoFrame. The semantics are slightly different from the RGBA copy in ways that are video-appropriate: aspect ratio is preserved via letterboxing, meaning the output is returned at the target's allocated size, no matter what (whereas CopyFromBackingStore returns whatever it wants, treating |dst_size| as a hint). Callers may only call CopyFromBackingStoreToVideoFrame after checking the result of CanCopyToVideoFrame(). Support is only on Windows now, and only while accelerated compositing is active. But the interface defined here should make it possible to implement VideoFrame readbacks on other platforms without having to touch the callers. [video_capture_controller.h] Amend the interface to allow a VideoFrame to be passed in, as an alternative to void*. The buffer-based interface was inadequate for our needs since stride was not handled. Using VideoFrame allows strides to be accomodated, and paves the way for the interface to pre-reserve the VideoFrames. [web_contents_video_capture_device.cc] Start using CopyFromBackingStoreToVideoFrame. Handling both copy flavors requires a bifurcation of much of the processing pipeline. When dealing with a VideoFrame, the Render stage can is bypassed completely. [accelerated_surface_win.h] Implementation of VideoFrame YV12 readback, using AcceleratedSurfaceTransformer's d3d-accelerated routines. BUG=161537 Review URL: https://chromiumcodereview.appspot.com/12090109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181785 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
nick@chromium.org
committed
Feb 11, 2013
1 parent
a6b73c6
commit c02cccc
Showing
32 changed files
with
922 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.