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

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

Issue 8491043: Allow linker initialization of lazy instance (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: willchan comments + rebase Created 9 years, 1 month 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
« no previous file with comments | « ui/gfx/gl/gl_surface.cc ('k') | webkit/blob/deletable_file_reference.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « ui/gfx/gl/gl_surface.cc ('k') | webkit/blob/deletable_file_reference.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698