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

Side by Side Diff: ui/surface/accelerated_surface_win.cc

Issue 14061025: ui: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 base::AutoLock locked(lock_); 177 base::AutoLock locked(lock_);
178 ResetDevice(); 178 ResetDevice();
179 } 179 }
180 180
181 void PresentThread::ResetDevice() { 181 void PresentThread::ResetDevice() {
182 TRACE_EVENT0("gpu", "PresentThread::ResetDevice"); 182 TRACE_EVENT0("gpu", "PresentThread::ResetDevice");
183 183
184 lock_.AssertAcquired(); 184 lock_.AssertAcquired();
185 185
186 // The D3D device must be created on the present thread. 186 // The D3D device must be created on the present thread.
187 CHECK(message_loop() == MessageLoop::current()); 187 CHECK(message_loop() == base::MessageLoop::current());
188 188
189 // This will crash some Intel drivers but we can't render anything without 189 // This will crash some Intel drivers but we can't render anything without
190 // reseting the device, which would be disappointing. 190 // reseting the device, which would be disappointing.
191 query_ = NULL; 191 query_ = NULL;
192 device_ = NULL; 192 device_ = NULL;
193 surface_transformer_.ReleaseAll(); 193 surface_transformer_.ReleaseAll();
194 194
195 g_accelerated_presenter_map.Pointer()->ResetPresentThread(this); 195 g_accelerated_presenter_map.Pointer()->ResetPresentThread(this);
196 196
197 if (!d3d_utils::CreateDevice(d3d_module_, 197 if (!d3d_utils::CreateDevice(d3d_module_,
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 presenter_->Suspend(); 1041 presenter_->Suspend();
1042 } 1042 }
1043 1043
1044 void AcceleratedSurface::WasHidden() { 1044 void AcceleratedSurface::WasHidden() {
1045 presenter_->WasHidden(); 1045 presenter_->WasHidden();
1046 } 1046 }
1047 1047
1048 void AcceleratedSurface::SetIsSessionLocked(bool locked) { 1048 void AcceleratedSurface::SetIsSessionLocked(bool locked) {
1049 presenter_->SetIsSessionLocked(locked); 1049 presenter_->SetIsSessionLocked(locked);
1050 } 1050 }
OLDNEW
« no previous file with comments | « ui/shell_dialogs/select_file_dialog_win.cc ('k') | ui/views/animation/bounds_animator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698