| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |