OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |