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

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

Issue 2447623002: Remove ImageObserver::didDraw() (Closed)
Patch Set: 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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 { 398 {
399 SkAutoCanvasRestore ar(canvas, false); 399 SkAutoCanvasRestore ar(canvas, false);
400 if (drawNeedsLayer(paint)) { 400 if (drawNeedsLayer(paint)) {
401 SkRect layerRect = dstRect; 401 SkRect layerRect = dstRect;
402 canvas->saveLayer(&layerRect, &paint); 402 canvas->saveLayer(&layerRect, &paint);
403 } 403 }
404 sk_sp<const SkPicture> recording = imagePicture.endRecording(); 404 sk_sp<const SkPicture> recording = imagePicture.endRecording();
405 canvas->drawPicture(recording.get()); 405 canvas->drawPicture(recording.get());
406 } 406 }
407 407
408 if (getImageObserver())
409 getImageObserver()->didDraw(this);
410
411 // Start any (SMIL) animations if needed. This will restart or continue 408 // Start any (SMIL) animations if needed. This will restart or continue
412 // animations if preceded by calls to resetAnimation or stopAnimation 409 // animations if preceded by calls to resetAnimation or stopAnimation
413 // respectively. 410 // respectively.
414 startAnimation(); 411 startAnimation();
415 } 412 }
416 413
417 LayoutReplaced* SVGImage::embeddedReplacedContent() const { 414 LayoutReplaced* SVGImage::embeddedReplacedContent() const {
418 SVGSVGElement* rootElement = svgRootElement(m_page.get()); 415 SVGSVGElement* rootElement = svgRootElement(m_page.get());
419 if (!rootElement) 416 if (!rootElement)
420 return nullptr; 417 return nullptr;
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 } 612 }
616 613
617 return m_page ? SizeAvailable : SizeUnavailable; 614 return m_page ? SizeAvailable : SizeUnavailable;
618 } 615 }
619 616
620 String SVGImage::filenameExtension() const { 617 String SVGImage::filenameExtension() const {
621 return "svg"; 618 return "svg";
622 } 619 }
623 620
624 } // namespace blink 621 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698