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

Side by Side Diff: ui/surface/accelerated_surface_win.cc

Issue 25022003: Report LatencyInfo through trace buffer (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 2 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 unified diff | Download patch
« ui/events/latency_info.cc ('K') | « ui/events/latency_info.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/surface/accelerated_surface_win.h" 5 #include "ui/surface/accelerated_surface_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <algorithm> 8 #include <algorithm>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 if (present_thread_->IsDeviceLost()) 839 if (present_thread_->IsDeviceLost())
840 present_thread_->ResetDevice(); 840 present_thread_->ResetDevice();
841 return; 841 return;
842 } 842 }
843 } else { 843 } else {
844 HDC dc = GetDC(window_); 844 HDC dc = GetDC(window_);
845 PresentWithGDI(dc); 845 PresentWithGDI(dc);
846 ReleaseDC(window_, dc); 846 ReleaseDC(window_, dc);
847 } 847 }
848 848
849 latency_info_.swap_timestamp = base::TimeTicks::HighResNow(); 849 latency_info_.Report(ui::INPUT_EVENT_LATENCY_FRAME_SWAP_COMPONENT);
850 850
851 hidden_ = false; 851 hidden_ = false;
852 852
853 D3DDISPLAYMODE display_mode; 853 D3DDISPLAYMODE display_mode;
854 hr = present_thread_->device()->GetDisplayMode(0, &display_mode); 854 hr = present_thread_->device()->GetDisplayMode(0, &display_mode);
855 if (FAILED(hr)) { 855 if (FAILED(hr)) {
856 LOG(ERROR) << "Failed to get display mode"; 856 LOG(ERROR) << "Failed to get display mode";
857 return; 857 return;
858 } 858 }
859 859
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 presenter_->Suspend(); 1090 presenter_->Suspend();
1091 } 1091 }
1092 1092
1093 void AcceleratedSurface::WasHidden() { 1093 void AcceleratedSurface::WasHidden() {
1094 presenter_->WasHidden(); 1094 presenter_->WasHidden();
1095 } 1095 }
1096 1096
1097 void AcceleratedSurface::SetIsSessionLocked(bool locked) { 1097 void AcceleratedSurface::SetIsSessionLocked(bool locked) {
1098 presenter_->SetIsSessionLocked(locked); 1098 presenter_->SetIsSessionLocked(locked);
1099 } 1099 }
OLDNEW
« ui/events/latency_info.cc ('K') | « ui/events/latency_info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698