Add relevant traces to measure copyFromCompositingSurface Turn-around time.

BUG= 399240

Review URL: https://codereview.chromium.org/424543003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287724 0039d316-1c4b-4281-b951-d872f2087c98
parent 0ad230c8
...@@ -2194,6 +2194,7 @@ void GLRenderer::EnsureScissorTestDisabled() { ...@@ -2194,6 +2194,7 @@ void GLRenderer::EnsureScissorTestDisabled() {
void GLRenderer::CopyCurrentRenderPassToBitmap( void GLRenderer::CopyCurrentRenderPassToBitmap(
DrawingFrame* frame, DrawingFrame* frame,
scoped_ptr<CopyOutputRequest> request) { scoped_ptr<CopyOutputRequest> request) {
TRACE_EVENT0("cc", "GLRenderer::CopyCurrentRenderPassToBitmap");
gfx::Rect copy_rect = frame->current_render_pass->output_rect; gfx::Rect copy_rect = frame->current_render_pass->output_rect;
if (request->has_area()) if (request->has_area())
copy_rect.Intersect(request->area()); copy_rect.Intersect(request->area());
......
...@@ -97,6 +97,8 @@ void CopyFromCompositingSurfaceFinished( ...@@ -97,6 +97,8 @@ void CopyFromCompositingSurfaceFinished(
const base::TimeTicks& start_time, const base::TimeTicks& start_time,
scoped_ptr<SkAutoLockPixels> bitmap_pixels_lock, scoped_ptr<SkAutoLockPixels> bitmap_pixels_lock,
bool result) { bool result) {
TRACE_EVENT0(
"cc", "RenderWidgetHostViewAndroid::CopyFromCompositingSurfaceFinished");
bitmap_pixels_lock.reset(); bitmap_pixels_lock.reset();
release_callback->Run(0, false); release_callback->Run(0, false);
UMA_HISTOGRAM_TIMES(kAsyncReadBackString, UMA_HISTOGRAM_TIMES(kAsyncReadBackString,
...@@ -731,6 +733,7 @@ void RenderWidgetHostViewAndroid::CopyFromCompositingSurface( ...@@ -731,6 +733,7 @@ void RenderWidgetHostViewAndroid::CopyFromCompositingSurface(
const gfx::Size& dst_size, const gfx::Size& dst_size,
const base::Callback<void(bool, const SkBitmap&)>& callback, const base::Callback<void(bool, const SkBitmap&)>& callback,
const SkColorType color_type) { const SkColorType color_type) {
TRACE_EVENT0("cc", "RenderWidgetHostViewAndroid::CopyFromCompositingSurface");
if ((!host_ || host_->is_hidden()) || if ((!host_ || host_->is_hidden()) ||
!IsReadbackConfigSupported(color_type)) { !IsReadbackConfigSupported(color_type)) {
callback.Run(false, SkBitmap()); callback.Run(false, SkBitmap());
...@@ -1543,6 +1546,8 @@ void RenderWidgetHostViewAndroid::PrepareTextureCopyOutputResult( ...@@ -1543,6 +1546,8 @@ void RenderWidgetHostViewAndroid::PrepareTextureCopyOutputResult(
scoped_ptr<cc::CopyOutputResult> result) { scoped_ptr<cc::CopyOutputResult> result) {
base::ScopedClosureRunner scoped_callback_runner( base::ScopedClosureRunner scoped_callback_runner(
base::Bind(callback, false, SkBitmap())); base::Bind(callback, false, SkBitmap()));
TRACE_EVENT0("cc",
"RenderWidgetHostViewAndroid::PrepareTextureCopyOutputResult");
if (!result->HasTexture() || result->IsEmpty() || result->size().IsEmpty()) if (!result->HasTexture() || result->IsEmpty() || result->size().IsEmpty())
return; return;
......
...@@ -413,6 +413,7 @@ void GLHelper::CopyTextureToImpl::ReadbackAsync( ...@@ -413,6 +413,7 @@ void GLHelper::CopyTextureToImpl::ReadbackAsync(
GLenum type, GLenum type,
size_t bytes_per_pixel, size_t bytes_per_pixel,
const base::Callback<void(bool)>& callback) { const base::Callback<void(bool)>& callback) {
TRACE_EVENT0("mirror", "GLHelper::CopyTextureToImpl::ReadbackAsync");
Request* request = Request* request =
new Request(dst_size, bytes_per_row, row_stride_bytes, out, callback); new Request(dst_size, bytes_per_row, row_stride_bytes, out, callback);
request_queue_.push(request); request_queue_.push(request);
......
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