| 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_.AddLatencyNumber( |
| 850 ui::INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, 0, 0); |
| 850 | 851 |
| 851 hidden_ = false; | 852 hidden_ = false; |
| 852 | 853 |
| 853 D3DDISPLAYMODE display_mode; | 854 D3DDISPLAYMODE display_mode; |
| 854 hr = present_thread_->device()->GetDisplayMode(0, &display_mode); | 855 hr = present_thread_->device()->GetDisplayMode(0, &display_mode); |
| 855 if (FAILED(hr)) { | 856 if (FAILED(hr)) { |
| 856 LOG(ERROR) << "Failed to get display mode"; | 857 LOG(ERROR) << "Failed to get display mode"; |
| 857 return; | 858 return; |
| 858 } | 859 } |
| 859 | 860 |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1090 presenter_->Suspend(); | 1091 presenter_->Suspend(); |
| 1091 } | 1092 } |
| 1092 | 1093 |
| 1093 void AcceleratedSurface::WasHidden() { | 1094 void AcceleratedSurface::WasHidden() { |
| 1094 presenter_->WasHidden(); | 1095 presenter_->WasHidden(); |
| 1095 } | 1096 } |
| 1096 | 1097 |
| 1097 void AcceleratedSurface::SetIsSessionLocked(bool locked) { | 1098 void AcceleratedSurface::SetIsSessionLocked(bool locked) { |
| 1098 presenter_->SetIsSessionLocked(locked); | 1099 presenter_->SetIsSessionLocked(locked); |
| 1099 } | 1100 } |
| OLD | NEW |