| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include <list> | 9 #include <list> |
| 10 | 10 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 private: | 85 private: |
| 86 int next_thread_; | 86 int next_thread_; |
| 87 scoped_ptr<base::Thread> present_threads_[kNumPresentThreads]; | 87 scoped_ptr<base::Thread> present_threads_[kNumPresentThreads]; |
| 88 scoped_refptr<QuerySyncThread> query_sync_thread_; | 88 scoped_refptr<QuerySyncThread> query_sync_thread_; |
| 89 | 89 |
| 90 DISALLOW_COPY_AND_ASSIGN(PresentThreadPool); | 90 DISALLOW_COPY_AND_ASSIGN(PresentThreadPool); |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 base::LazyInstance<PresentThreadPool> | 93 base::LazyInstance<PresentThreadPool> |
| 94 g_present_thread_pool(base::LINKER_INITIALIZED); | 94 g_present_thread_pool = LAZY_INSTANCE_INITIALIZER; |
| 95 | 95 |
| 96 QuerySyncThread::QuerySyncThread(const char* name) | 96 QuerySyncThread::QuerySyncThread(const char* name) |
| 97 : base::Thread(name), | 97 : base::Thread(name), |
| 98 poll_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { | 98 poll_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { |
| 99 } | 99 } |
| 100 | 100 |
| 101 QuerySyncThread::~QuerySyncThread() { | 101 QuerySyncThread::~QuerySyncThread() { |
| 102 } | 102 } |
| 103 | 103 |
| 104 void QuerySyncThread::AcknowledgeQuery( | 104 void QuerySyncThread::AcknowledgeQuery( |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 completion_task); | 496 completion_task); |
| 497 } | 497 } |
| 498 | 498 |
| 499 { | 499 { |
| 500 TRACE_EVENT0("surface", "Present"); | 500 TRACE_EVENT0("surface", "Present"); |
| 501 hr = device_->Present(&rect, &rect, NULL, NULL); | 501 hr = device_->Present(&rect, &rect, NULL, NULL); |
| 502 if (FAILED(hr)) | 502 if (FAILED(hr)) |
| 503 return; | 503 return; |
| 504 } | 504 } |
| 505 } | 505 } |
| OLD | NEW |