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

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

Issue 1925533003: High CPU and increased memory usage fix for high-res (GIF, WEBP...) animations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: BitmapImage::isAllDataReceived and hasColorProfile back to public Created 4 years, 7 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 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 405
406 // FIXME: support CatchUpAnimation = CatchUp. 406 // FIXME: support CatchUpAnimation = CatchUp.
407 void SVGImage::startAnimation(CatchUpAnimation) 407 void SVGImage::startAnimation(CatchUpAnimation)
408 { 408 {
409 SVGSVGElement* rootElement = svgRootElement(m_page.get()); 409 SVGSVGElement* rootElement = svgRootElement(m_page.get());
410 if (!rootElement || !rootElement->animationsPaused()) 410 if (!rootElement || !rootElement->animationsPaused())
411 return; 411 return;
412 rootElement->unpauseAnimations(); 412 rootElement->unpauseAnimations();
413 } 413 }
414 414
415 void SVGImage::stopAnimation()
416 {
417 SVGSVGElement* rootElement = svgRootElement(m_page.get());
418 if (!rootElement)
419 return;
420 rootElement->pauseAnimations();
421 }
422
423 void SVGImage::resetAnimation() 415 void SVGImage::resetAnimation()
424 { 416 {
425 SVGSVGElement* rootElement = svgRootElement(m_page.get()); 417 SVGSVGElement* rootElement = svgRootElement(m_page.get());
426 if (!rootElement) 418 if (!rootElement)
427 return; 419 return;
428 rootElement->pauseAnimations(); 420 rootElement->pauseAnimations();
429 rootElement->setCurrentTime(0); 421 rootElement->setCurrentTime(0);
430 } 422 }
431 423
432 bool SVGImage::hasAnimations() const 424 bool SVGImage::hasAnimations() const
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 533
542 return m_page; 534 return m_page;
543 } 535 }
544 536
545 String SVGImage::filenameExtension() const 537 String SVGImage::filenameExtension() const
546 { 538 {
547 return "svg"; 539 return "svg";
548 } 540 }
549 541
550 } // namespace blink 542 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698