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

Side by Side Diff: Source/core/rendering/compositing/RenderLayerCompositor.cpp

Issue 135693003: Defer starting of animations until after compositing update (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Reland after fixing flaky tests. Created 6 years, 10 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 | « Source/core/rendering/compositing/RenderLayerCompositor.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) 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Apple 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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 // FIXME: We should carefully clean up the awkward early-exit semantics, bal ancing 394 // FIXME: We should carefully clean up the awkward early-exit semantics, bal ancing
395 // between skipping unnecessary compositing updates and not incorrectly skip ping 395 // between skipping unnecessary compositing updates and not incorrectly skip ping
396 // necessary updates. 396 // necessary updates.
397 397
398 // Avoid updating the layers with old values. Compositing layers will be upd ated after the layout is finished. 398 // Avoid updating the layers with old values. Compositing layers will be upd ated after the layout is finished.
399 // FIXME: Can we assert that we never return here? 399 // FIXME: Can we assert that we never return here?
400 if (m_renderView->needsLayout()) 400 if (m_renderView->needsLayout())
401 return; 401 return;
402 402
403 lifecycle().advanceTo(DocumentLifecycle::InCompositingUpdate); 403 lifecycle().advanceTo(DocumentLifecycle::InCompositingUpdate);
404 DocumentLifecycle::Scope lifecycleScope(lifecycle(), DocumentLifecycle::Comp ositingClean);
405 404
405 updateCompositingLayersInternal();
406
407 lifecycle().advanceTo(DocumentLifecycle::CompositingClean);
408
409 DocumentAnimations::startPendingAnimations(m_renderView->document());
410 DocumentAnimations::dispatchAnimationEventsAsync(m_renderView->document());
411 ASSERT(m_renderView->document().lifecycle().state() == DocumentLifecycle::Co mpositingClean);
412 }
413
414 void RenderLayerCompositor::updateCompositingLayersInternal()
415 {
406 if (isMainFrame() && m_renderView->frameView()) 416 if (isMainFrame() && m_renderView->frameView())
407 finishCompositingUpdateForFrameTree(&m_renderView->frameView()->frame()) ; 417 finishCompositingUpdateForFrameTree(&m_renderView->frameView()->frame()) ;
408 418
409 if (m_forceCompositingMode && !m_compositing) 419 if (m_forceCompositingMode && !m_compositing)
410 enableCompositingMode(true); 420 enableCompositingMode(true);
411 421
412 if (!m_needsToRecomputeCompositingRequirements && !m_compositing) 422 if (!m_needsToRecomputeCompositingRequirements && !m_compositing)
413 return; 423 return;
414 424
415 TemporaryChange<bool> postLayoutChange(m_inPostLayoutUpdate, true); 425 TemporaryChange<bool> postLayoutChange(m_inPostLayoutUpdate, true);
(...skipping 2326 matching lines...) Expand 10 before | Expand all | Expand 10 after
2742 } else if (graphicsLayer == m_scrollLayer.get()) { 2752 } else if (graphicsLayer == m_scrollLayer.get()) {
2743 name = "Frame Scrolling Layer"; 2753 name = "Frame Scrolling Layer";
2744 } else { 2754 } else {
2745 ASSERT_NOT_REACHED(); 2755 ASSERT_NOT_REACHED();
2746 } 2756 }
2747 2757
2748 return name; 2758 return name;
2749 } 2759 }
2750 2760
2751 } // namespace WebCore 2761 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/compositing/RenderLayerCompositor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698