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

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: fix compile error 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
« no previous file with comments | « ui/events/latency_info_unittest.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 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 if (present_thread_->IsDeviceLost()) 840 if (present_thread_->IsDeviceLost())
841 present_thread_->ResetDevice(); 841 present_thread_->ResetDevice();
842 return; 842 return;
843 } 843 }
844 } else { 844 } else {
845 HDC dc = GetDC(window_); 845 HDC dc = GetDC(window_);
846 PresentWithGDI(dc); 846 PresentWithGDI(dc);
847 ReleaseDC(window_, dc); 847 ReleaseDC(window_, dc);
848 } 848 }
849 849
850 latency_info_.swap_timestamp = base::TimeTicks::HighResNow(); 850 latency_info_.AddLatencyNumber(
851 ui::INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, 0, 0);
851 852
852 hidden_ = false; 853 hidden_ = false;
853 854
854 D3DDISPLAYMODE display_mode; 855 D3DDISPLAYMODE display_mode;
855 hr = present_thread_->device()->GetDisplayMode(0, &display_mode); 856 hr = present_thread_->device()->GetDisplayMode(0, &display_mode);
856 if (FAILED(hr)) { 857 if (FAILED(hr)) {
857 LOG(ERROR) << "Failed to get display mode"; 858 LOG(ERROR) << "Failed to get display mode";
858 return; 859 return;
859 } 860 }
860 861
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 presenter_->Suspend(); 1095 presenter_->Suspend();
1095 } 1096 }
1096 1097
1097 void AcceleratedSurface::WasHidden() { 1098 void AcceleratedSurface::WasHidden() {
1098 presenter_->WasHidden(); 1099 presenter_->WasHidden();
1099 } 1100 }
1100 1101
1101 void AcceleratedSurface::SetIsSessionLocked(bool locked) { 1102 void AcceleratedSurface::SetIsSessionLocked(bool locked) {
1102 presenter_->SetIsSessionLocked(locked); 1103 presenter_->SetIsSessionLocked(locked);
1103 } 1104 }
OLDNEW
« no previous file with comments | « ui/events/latency_info_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698