Commit 3918768c authored by Miguel Casas's avatar Miguel Casas Committed by Commit Bot

GpuMemoryBufferVideoFramePool: add upload TRACE

GpuMemoryBufferVideoFramePool::CopyVideoFrameToGpuMemoryBuffers schedules
copies to GMBs using a Pool thread, so the upload is sliced and run in
parallel, reconvening after all sub tasks are finished.

This CL adds an ASYNC TRACE to track the duration of the full copy cycle,
encompassing all the parallel (and possibly heterogenous) uploads, to
make it easy to reason about how much time the copy-to-GMBs take.

Bug: 803975
Change-Id: Ied827b30b43931ca06996c97dd8f855b75c9ff7a
Reviewed-on: https://chromium-review.googlesource.com/886962Reviewed-by: default avatarChrome Cunningham <chcunningham@chromium.org>
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532101}
parent e0bcd910
......@@ -610,6 +610,9 @@ void GpuMemoryBufferVideoFramePool::PoolImpl::OnCopiesDone(
}
}
TRACE_EVENT_ASYNC_END0("media", "CopyVideoFrameToGpuMemoryBuffers",
video_frame->timestamp().InNanoseconds() /* id */);
media_task_runner_->PostTask(
FROM_HERE,
base::Bind(&PoolImpl::BindAndCreateMailboxesHardwareFrameResources, this,
......@@ -655,6 +658,8 @@ void GpuMemoryBufferVideoFramePool::PoolImpl::CopyVideoFrameToGpuMemoryBuffers(
}
}
TRACE_EVENT_ASYNC_BEGIN0("media", "CopyVideoFrameToGpuMemoryBuffers",
video_frame->timestamp().InNanoseconds() /* id */);
// Post all the async tasks.
for (size_t i = 0; i < num_planes; i += planes_per_copy) {
gfx::GpuMemoryBuffer* buffer =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment