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

Unified Diff: android_webview/native/aw_contents.cc

Issue 778643003: aw: Add more trace events to drawing functions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « android_webview/java/src/org/chromium/android_webview/AwContents.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/native/aw_contents.cc
diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc
index 50c6b36c63a30430417122e30e288c8c59ee4d3c..cd2aae4fac714c443e31d0c3a08e47441f7f573b 100644
--- a/android_webview/native/aw_contents.cc
+++ b/android_webview/native/aw_contents.cc
@@ -881,8 +881,11 @@ bool AwContents::OnDraw(JNIEnv* env,
}
gfx::Size view_size = browser_view_renderer_.size();
- if (view_size.IsEmpty())
+ if (view_size.IsEmpty()) {
+ TRACE_EVENT_INSTANT0("android_webview", "EarlyOut_EmptySize",
+ TRACE_EVENT_SCOPE_THREAD);
return false;
+ }
// TODO(hush): Right now webview size is passed in as the auxiliary bitmap
// size, which might hurt performace (only for software draws with auxiliary
@@ -891,8 +894,11 @@ bool AwContents::OnDraw(JNIEnv* env,
// viewspace. Use the resulting rect as the auxiliary bitmap.
scoped_ptr<SoftwareCanvasHolder> canvas_holder =
SoftwareCanvasHolder::Create(canvas, scroll, view_size);
- if (!canvas_holder || !canvas_holder->GetCanvas())
+ if (!canvas_holder || !canvas_holder->GetCanvas()) {
+ TRACE_EVENT_INSTANT0("android_webview", "EarlyOut_EmptySize",
+ TRACE_EVENT_SCOPE_THREAD);
return false;
+ }
return browser_view_renderer_.OnDrawSoftware(canvas_holder->GetCanvas());
}
« no previous file with comments | « android_webview/java/src/org/chromium/android_webview/AwContents.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698