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

Side by Side Diff: third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp

Issue 2724083002: [SPv2] Decomposite otherwise-compositable animations that paint nothing. (Closed)
Patch Set: Add unit tests. Created 3 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org> 2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org>
3 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved.
4 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 FrameView* frameView = toLocalFrame(m_page->mainFrame())->view(); 578 FrameView* frameView = toLocalFrame(m_page->mainFrame())->view();
579 frameView->updateAllLifecyclePhasesExceptPaint(); 579 frameView->updateAllLifecyclePhasesExceptPaint();
580 580
581 // For SPv2 we run updateAnimations after the paint phase, but per above 581 // For SPv2 we run updateAnimations after the paint phase, but per above
582 // comment we don't want to run lifecycle through to paint for SVG images. 582 // comment we don't want to run lifecycle through to paint for SVG images.
583 // Since we know SVG images never have composited animations we can update 583 // Since we know SVG images never have composited animations we can update
584 // animations directly without worrying about including 584 // animations directly without worrying about including
585 // PaintArtifactCompositor analysis of whether animations should be 585 // PaintArtifactCompositor analysis of whether animations should be
586 // composited. 586 // composited.
587 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { 587 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
588 Optional<CompositorElementIdSet> compositedElementIds;
588 DocumentAnimations::updateAnimations(frameView->layoutView()->document(), 589 DocumentAnimations::updateAnimations(frameView->layoutView()->document(),
589 DocumentLifecycle::LayoutClean); 590 DocumentLifecycle::LayoutClean,
591 compositedElementIds);
590 } 592 }
591 } 593 }
592 594
593 void SVGImage::advanceAnimationForTesting() { 595 void SVGImage::advanceAnimationForTesting() {
594 if (SVGSVGElement* rootElement = svgRootElement(m_page.get())) { 596 if (SVGSVGElement* rootElement = svgRootElement(m_page.get())) {
595 rootElement->timeContainer()->advanceFrameForTesting(); 597 rootElement->timeContainer()->advanceFrameForTesting();
596 598
597 // The following triggers animation updates which can issue a new draw 599 // The following triggers animation updates which can issue a new draw
598 // but will not permanently change the animation timeline. 600 // but will not permanently change the animation timeline.
599 // TODO(pdr): Actually advance the document timeline so CSS animations 601 // TODO(pdr): Actually advance the document timeline so CSS animations
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 } 706 }
705 707
706 return m_page ? SizeAvailable : SizeUnavailable; 708 return m_page ? SizeAvailable : SizeUnavailable;
707 } 709 }
708 710
709 String SVGImage::filenameExtension() const { 711 String SVGImage::filenameExtension() const {
710 return "svg"; 712 return "svg";
711 } 713 }
712 714
713 } // namespace blink 715 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698