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

Side by Side Diff: cc/single_thread_proxy.cc

Issue 10690168: Aura: Resize locks with --ui-enable-threaded-compositing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Defer commits and rebase. Created 8 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
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 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 "config.h" 5 #include "config.h"
6 6
7 #include "cc/single_thread_proxy.h" 7 #include "cc/single_thread_proxy.h"
8 8
9 #include "CCDrawQuad.h" 9 #include "CCDrawQuad.h"
10 #include "CCGraphicsContext.h" 10 #include "CCGraphicsContext.h"
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 } 224 }
225 225
226 void SingleThreadProxy::setNeedsRedraw() 226 void SingleThreadProxy::setNeedsRedraw()
227 { 227 {
228 // FIXME: Once we move render_widget scheduling into this class, we can 228 // FIXME: Once we move render_widget scheduling into this class, we can
229 // treat redraw requests more efficiently than commitAndRedraw requests. 229 // treat redraw requests more efficiently than commitAndRedraw requests.
230 m_layerTreeHostImpl->setFullRootLayerDamage(); 230 m_layerTreeHostImpl->setFullRootLayerDamage();
231 setNeedsCommit(); 231 setNeedsCommit();
232 } 232 }
233 233
234 void SingleThreadProxy::setDeferCommits(bool)
235 {
236 }
237
234 bool SingleThreadProxy::commitRequested() const 238 bool SingleThreadProxy::commitRequested() const
235 { 239 {
236 return false; 240 return false;
237 } 241 }
238 242
239 void SingleThreadProxy::didAddAnimation() 243 void SingleThreadProxy::didAddAnimation()
240 { 244 {
241 } 245 }
242 246
243 size_t SingleThreadProxy::maxPartialTextureUpdates() const 247 size_t SingleThreadProxy::maxPartialTextureUpdates() const
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 NOTREACHED(); 313 NOTREACHED();
310 } 314 }
311 315
312 bool SingleThreadProxy::commitAndComposite() 316 bool SingleThreadProxy::commitAndComposite()
313 { 317 {
314 DCHECK(Proxy::isMainThread()); 318 DCHECK(Proxy::isMainThread());
315 319
316 if (!m_layerTreeHost->initializeRendererIfNeeded()) 320 if (!m_layerTreeHost->initializeRendererIfNeeded())
317 return false; 321 return false;
318 322
323 if (m_layerTreeHost->deferCommits()) {
324 TRACE_EVENT0("cc", "EarlyOut_DeferCommits");
jamesr 2012/10/23 17:50:44 I don't think this is right. In single-threaded m
jonathan.backer 2012/10/23 19:26:42 Done.
325 return false;
326 }
327
319 // Unlink any texture backings that were deleted 328 // Unlink any texture backings that were deleted
320 PrioritizedTextureManager::BackingList evictedContentsTexturesBackings; 329 PrioritizedTextureManager::BackingList evictedContentsTexturesBackings;
321 { 330 {
322 DebugScopedSetImplThread implThread; 331 DebugScopedSetImplThread implThread;
323 m_layerTreeHost->contentsTextureManager()->getEvictedBackings(evictedCon tentsTexturesBackings); 332 m_layerTreeHost->contentsTextureManager()->getEvictedBackings(evictedCon tentsTexturesBackings);
324 } 333 }
325 m_layerTreeHost->contentsTextureManager()->unlinkEvictedBackings(evictedCont entsTexturesBackings); 334 m_layerTreeHost->contentsTextureManager()->unlinkEvictedBackings(evictedCont entsTexturesBackings);
326 335
327 scoped_ptr<TextureUpdateQueue> queue = make_scoped_ptr(new TextureUpdateQueu e); 336 scoped_ptr<TextureUpdateQueue> queue = make_scoped_ptr(new TextureUpdateQueu e);
328 m_layerTreeHost->updateLayers(*(queue.get()), m_layerTreeHostImpl->memoryAll ocationLimitBytes()); 337 m_layerTreeHost->updateLayers(*(queue.get()), m_layerTreeHostImpl->memoryAll ocationLimitBytes());
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 382
374 void SingleThreadProxy::didSwapFrame() 383 void SingleThreadProxy::didSwapFrame()
375 { 384 {
376 if (m_nextFrameIsNewlyCommittedFrame) { 385 if (m_nextFrameIsNewlyCommittedFrame) {
377 m_nextFrameIsNewlyCommittedFrame = false; 386 m_nextFrameIsNewlyCommittedFrame = false;
378 m_layerTreeHost->didCommitAndDrawFrame(); 387 m_layerTreeHost->didCommitAndDrawFrame();
379 } 388 }
380 } 389 }
381 390
382 } 391 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698