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

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

Issue 2447623002: Remove ImageObserver::didDraw() (Closed)
Patch Set: Rebawse Created 4 years, 1 month 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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 { 400 {
401 SkAutoCanvasRestore ar(canvas, false); 401 SkAutoCanvasRestore ar(canvas, false);
402 if (drawNeedsLayer(paint)) { 402 if (drawNeedsLayer(paint)) {
403 SkRect layerRect = dstRect; 403 SkRect layerRect = dstRect;
404 canvas->saveLayer(&layerRect, &paint); 404 canvas->saveLayer(&layerRect, &paint);
405 } 405 }
406 sk_sp<const SkPicture> recording = imagePicture.endRecording(); 406 sk_sp<const SkPicture> recording = imagePicture.endRecording();
407 canvas->drawPicture(recording.get()); 407 canvas->drawPicture(recording.get());
408 } 408 }
409 409
410 if (getImageObserver())
411 getImageObserver()->didDraw(this);
412
413 // Start any (SMIL) animations if needed. This will restart or continue 410 // Start any (SMIL) animations if needed. This will restart or continue
414 // animations if preceded by calls to resetAnimation or stopAnimation 411 // animations if preceded by calls to resetAnimation or stopAnimation
415 // respectively. 412 // respectively.
416 startAnimation(); 413 startAnimation();
417 } 414 }
418 415
419 LayoutReplaced* SVGImage::embeddedReplacedContent() const { 416 LayoutReplaced* SVGImage::embeddedReplacedContent() const {
420 SVGSVGElement* rootElement = svgRootElement(m_page.get()); 417 SVGSVGElement* rootElement = svgRootElement(m_page.get());
421 if (!rootElement) 418 if (!rootElement)
422 return nullptr; 419 return nullptr;
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 } 619 }
623 620
624 return m_page ? SizeAvailable : SizeUnavailable; 621 return m_page ? SizeAvailable : SizeUnavailable;
625 } 622 }
626 623
627 String SVGImage::filenameExtension() const { 624 String SVGImage::filenameExtension() const {
628 return "svg"; 625 return "svg";
629 } 626 }
630 627
631 } // namespace blink 628 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ImageResource.cpp ('k') | third_party/WebKit/Source/core/svg/graphics/SVGImageTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698