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

Unified Diff: ui/surface/accelerated_surface_win.cc

Issue 10871080: Add tracing to early-outs of accelerated surface presents (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/surface/accelerated_surface_win.cc
diff --git a/ui/surface/accelerated_surface_win.cc b/ui/surface/accelerated_surface_win.cc
index 2fadfc00fdd31e64b4ca04acd7695b803428162b..16b2cc10677839315bad74b38e7587cf8401ec65 100644
--- a/ui/surface/accelerated_surface_win.cc
+++ b/ui/surface/accelerated_surface_win.cc
@@ -689,6 +689,7 @@ void AcceleratedPresenter::DoPresentAndAcknowledge(
if (!present_thread_->device()) {
if (!completion_task.is_null())
completion_task.Run(false, base::TimeTicks(), base::TimeDelta());
+ TRACE_EVENT0("gpu", "EarlyOut_NoDevice");
return;
}
@@ -697,8 +698,10 @@ void AcceleratedPresenter::DoPresentAndAcknowledge(
base::Bind(completion_task, true, base::TimeTicks(), base::TimeDelta()));
// If invalidated, do nothing, the window is gone.
- if (!window_)
+ if (!window_) {
+ TRACE_EVENT0("gpu", "EarlyOut_NoWindow");
return;
+ }
// If the window is a different size than the swap chain that is being
// presented then drop the frame.
@@ -706,6 +709,11 @@ void AcceleratedPresenter::DoPresentAndAcknowledge(
GetClientRect(window_, &window_rect);
if (hidden_ && (window_rect.right != size.width() ||
window_rect.bottom != size.height())) {
+ TRACE_EVENT2("gpu", "EarlyOut_WrongWindowSize",
+ "backwidth", size.width(), "backheight", size.height());
+ TRACE_EVENT2("gpu", "EarlyOut_WrongWindowSize2",
+ "windowwidth", window_rect.right,
+ "windowheight", window_rect.bottom);
return;
}
@@ -758,15 +766,19 @@ void AcceleratedPresenter::DoPresentAndAcknowledge(
base::win::ScopedComPtr<IDirect3DSurface9> source_surface;
hr = source_texture_->GetSurfaceLevel(0, source_surface.Receive());
- if (FAILED(hr))
+ if (FAILED(hr)) {
+ TRACE_EVENT0("gpu", "EarlyOut_NoSurfaceLevel");
return;
+ }
base::win::ScopedComPtr<IDirect3DSurface9> dest_surface;
hr = swap_chain_->GetBackBuffer(0,
D3DBACKBUFFER_TYPE_MONO,
dest_surface.Receive());
- if (FAILED(hr))
+ if (FAILED(hr)) {
+ TRACE_EVENT0("gpu", "EarlyOut_NoBackbuffer");
return;
+ }
RECT rect = {
0, 0,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698