| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 g_accelerated_presenter_map = LAZY_INSTANCE_INITIALIZER; | 167 g_accelerated_presenter_map = LAZY_INSTANCE_INITIALIZER; |
| 168 | 168 |
| 169 PresentThread::PresentThread(const char* name, uint64 adapter_luid) | 169 PresentThread::PresentThread(const char* name, uint64 adapter_luid) |
| 170 : base::Thread(name), | 170 : base::Thread(name), |
| 171 adapter_luid_(adapter_luid) { | 171 adapter_luid_(adapter_luid) { |
| 172 } | 172 } |
| 173 | 173 |
| 174 void PresentThread::SetAdapterLUID(uint64 adapter_luid) { | 174 void PresentThread::SetAdapterLUID(uint64 adapter_luid) { |
| 175 base::AutoLock locked(lock_); | 175 base::AutoLock locked(lock_); |
| 176 | 176 |
| 177 CHECK(message_loop() == MessageLoop::current()); | 177 CHECK(message_loop() == base::MessageLoop::current()); |
| 178 | 178 |
| 179 if (adapter_luid_ == adapter_luid) | 179 if (adapter_luid_ == adapter_luid) |
| 180 return; | 180 return; |
| 181 | 181 |
| 182 adapter_luid_ = adapter_luid; | 182 adapter_luid_ = adapter_luid; |
| 183 if (device_) | 183 if (device_) |
| 184 ResetDevice(); | 184 ResetDevice(); |
| 185 } | 185 } |
| 186 | 186 |
| 187 void PresentThread::InitDevice() { | 187 void PresentThread::InitDevice() { |
| (...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1085 presenter_->Suspend(); | 1085 presenter_->Suspend(); |
| 1086 } | 1086 } |
| 1087 | 1087 |
| 1088 void AcceleratedSurface::WasHidden() { | 1088 void AcceleratedSurface::WasHidden() { |
| 1089 presenter_->WasHidden(); | 1089 presenter_->WasHidden(); |
| 1090 } | 1090 } |
| 1091 | 1091 |
| 1092 void AcceleratedSurface::SetIsSessionLocked(bool locked) { | 1092 void AcceleratedSurface::SetIsSessionLocked(bool locked) { |
| 1093 presenter_->SetIsSessionLocked(locked); | 1093 presenter_->SetIsSessionLocked(locked); |
| 1094 } | 1094 } |
| OLD | NEW |