| 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 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |