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/gfx/surface/accelerated_surface_win.h" | 5 #include "ui/gfx/surface/accelerated_surface_win.h" |
6 | 6 |
7 #include <d3d9.h> | 7 #include <d3d9.h> |
8 #include <windows.h> | 8 #include <windows.h> |
9 | 9 |
10 #include <list> | 10 #include <list> |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
316 D3DDEVTYPE_HAL, | 316 D3DDEVTYPE_HAL, |
317 window, | 317 window, |
318 D3DCREATE_FPU_PRESERVE | D3DCREATE_SOFTWARE_VERTEXPROCESSING | | 318 D3DCREATE_FPU_PRESERVE | D3DCREATE_SOFTWARE_VERTEXPROCESSING | |
319 D3DCREATE_MULTITHREADED, | 319 D3DCREATE_MULTITHREADED, |
320 ¶meters, | 320 ¶meters, |
321 NULL, | 321 NULL, |
322 device_.Receive()); | 322 device_.Receive()); |
323 if (FAILED(hr)) | 323 if (FAILED(hr)) |
324 return; | 324 return; |
325 | 325 |
326 // Increase the GPU priority of this thread, so the StretchRect to the | |
327 // backbuffer doesn't have to wait for expensive commands in the GPU process | |
328 // to execute. | |
329 device_->SetGPUThreadPriority(7); | |
apatrick_chromium
2012/03/06 22:20:31
This isn't going to give this thread higher GPU pr
| |
330 | |
326 hr = device_->CreateQuery(D3DQUERYTYPE_EVENT, query_.Receive()); | 331 hr = device_->CreateQuery(D3DQUERYTYPE_EVENT, query_.Receive()); |
327 if (FAILED(hr)) { | 332 if (FAILED(hr)) { |
328 device_ = NULL; | 333 device_ = NULL; |
329 return; | 334 return; |
330 } | 335 } |
331 | 336 |
332 return; | 337 return; |
333 } | 338 } |
334 | 339 |
335 void AcceleratedPresenter::DoResize(const gfx::Size& size) { | 340 void AcceleratedPresenter::DoResize(const gfx::Size& size) { |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
509 } | 514 } |
510 | 515 |
511 bool AcceleratedSurface::Present(HWND window) { | 516 bool AcceleratedSurface::Present(HWND window) { |
512 return presenter_->Present(window); | 517 return presenter_->Present(window); |
513 } | 518 } |
514 | 519 |
515 void AcceleratedSurface::Suspend() { | 520 void AcceleratedSurface::Suspend() { |
516 presenter_->Suspend(); | 521 presenter_->Suspend(); |
517 } | 522 } |
518 | 523 |
OLD | NEW |