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

Side by Side Diff: Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp

Issue 10201008: Merge 114475 - [chromium] Ensure RateLimiter waits for Swapbuffers completion (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 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
« no previous file with comments | « Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.h ('k') | 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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 CCProxy::implThread()->postTask(createCCThreadTask(this, &CCThreadProxy::lay erTreeHostClosedOnImplThread, AllowCrossThreadAccess(&completion))); 373 CCProxy::implThread()->postTask(createCCThreadTask(this, &CCThreadProxy::lay erTreeHostClosedOnImplThread, AllowCrossThreadAccess(&completion)));
374 completion.wait(); 374 completion.wait();
375 375
376 m_mainThreadProxy->shutdown(); // Stop running tasks posted to us. 376 m_mainThreadProxy->shutdown(); // Stop running tasks posted to us.
377 377
378 ASSERT(!m_layerTreeHostImpl); // verify that the impl deleted. 378 ASSERT(!m_layerTreeHostImpl); // verify that the impl deleted.
379 m_layerTreeHost = 0; 379 m_layerTreeHost = 0;
380 m_started = false; 380 m_started = false;
381 } 381 }
382 382
383 void CCThreadProxy::forceSerializeOnSwapBuffers()
384 {
385 CCCompletionEvent completion;
386 CCProxy::implThread()->postTask(createCCThreadTask(this, &CCThreadProxy::for ceSerializeOnSwapBuffersOnImplThread, AllowCrossThreadAccess(&completion)));
387 completion.wait();
388 }
389
390 void CCThreadProxy::forceSerializeOnSwapBuffersOnImplThread(CCCompletionEvent* c ompletion)
391 {
392 if (m_layerRendererInitialized)
393 m_layerTreeHostImpl->layerRenderer()->doNoOp();
394 completion->signal();
395 }
396
397
383 void CCThreadProxy::finishAllRenderingOnImplThread(CCCompletionEvent* completion ) 398 void CCThreadProxy::finishAllRenderingOnImplThread(CCCompletionEvent* completion )
384 { 399 {
385 TRACE_EVENT("CCThreadProxy::finishAllRenderingOnImplThread", this, 0); 400 TRACE_EVENT("CCThreadProxy::finishAllRenderingOnImplThread", this, 0);
386 ASSERT(isImplThread()); 401 ASSERT(isImplThread());
387 ASSERT(!m_finishAllRenderingCompletionEventOnImplThread); 402 ASSERT(!m_finishAllRenderingCompletionEventOnImplThread);
388 m_finishAllRenderingCompletionEventOnImplThread = completion; 403 m_finishAllRenderingCompletionEventOnImplThread = completion;
389 404
390 m_schedulerOnImplThread->setNeedsForcedRedraw(); 405 m_schedulerOnImplThread->setNeedsForcedRedraw();
391 } 406 }
392 407
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostImpl->con tentsTextureAllocator()); 771 m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostImpl->con tentsTextureAllocator());
757 *recreateSucceeded = m_layerTreeHostImpl->initializeLayerRenderer(adoptRef(c ontextPtr)); 772 *recreateSucceeded = m_layerTreeHostImpl->initializeLayerRenderer(adoptRef(c ontextPtr));
758 if (*recreateSucceeded) { 773 if (*recreateSucceeded) {
759 *capabilities = m_layerTreeHostImpl->layerRendererCapabilities(); 774 *capabilities = m_layerTreeHostImpl->layerRendererCapabilities();
760 m_schedulerOnImplThread->didRecreateContext(); 775 m_schedulerOnImplThread->didRecreateContext();
761 } 776 }
762 completion->signal(); 777 completion->signal();
763 } 778 }
764 779
765 } // namespace WebCore 780 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698