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

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

Issue 9167036: Win AcceleratedSurface always presents on the thread with it has affinity. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 11 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
« no previous file with comments | « no previous file | no next file » | 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) 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 base::AtomicRefCountInc(&num_pending_resizes_); 180 base::AtomicRefCountInc(&num_pending_resizes_);
181 181
182 g_present_thread_pool.Pointer()->PostTask( 182 g_present_thread_pool.Pointer()->PostTask(
183 thread_affinity_, 183 thread_affinity_,
184 FROM_HERE, 184 FROM_HERE,
185 base::Bind(&AcceleratedPresenter::DoResize, 185 base::Bind(&AcceleratedPresenter::DoResize,
186 base::Unretained(this), 186 base::Unretained(this),
187 quantized_size)); 187 quantized_size));
188 } 188 }
189 189
190 // This might unnecessarily post to the thread with which the swap chain has
191 // affinity. This will only result in potentially delaying the present.
192 g_present_thread_pool.Pointer()->PostTask( 190 g_present_thread_pool.Pointer()->PostTask(
193 num_pending_resizes_ ? 191 thread_affinity_,
194 thread_affinity_ : g_present_thread_pool.Pointer()->NextThread(),
195 FROM_HERE, 192 FROM_HERE,
196 base::Bind(&AcceleratedPresenter::DoPresentAndAcknowledge, 193 base::Bind(&AcceleratedPresenter::DoPresentAndAcknowledge,
197 base::Unretained(this), 194 base::Unretained(this),
198 window, 195 window,
199 size, 196 size,
200 surface_id, 197 surface_id,
201 completion_task)); 198 completion_task));
202 } 199 }
203 200
204 bool AcceleratedPresenter::Present(gfx::NativeWindow window) { 201 bool AcceleratedPresenter::Present(gfx::NativeWindow window) {
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 const base::Closure& completion_task) { 492 const base::Closure& completion_task) {
496 presenter_->AsyncPresentAndAcknowledge(window, 493 presenter_->AsyncPresentAndAcknowledge(window,
497 size, 494 size,
498 surface_id, 495 surface_id,
499 completion_task); 496 completion_task);
500 } 497 }
501 498
502 bool AcceleratedSurface::Present(HWND window) { 499 bool AcceleratedSurface::Present(HWND window) {
503 return presenter_->Present(window); 500 return presenter_->Present(window);
504 } 501 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698