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

Side by Side Diff: third_party/WebKit/Source/core/svg/graphics/SVGImageChromeClient.h

Issue 2000483003: Rework timeline/frame scheduling logic for SVGImage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CSSCrossfadeValue needs to reply truthfully to willRenderImage. 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) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 26 matching lines...) Expand all
37 class SVGImage; 37 class SVGImage;
38 38
39 class SVGImageChromeClient final : public EmptyChromeClient { 39 class SVGImageChromeClient final : public EmptyChromeClient {
40 public: 40 public:
41 static SVGImageChromeClient* create(SVGImage*); 41 static SVGImageChromeClient* create(SVGImage*);
42 42
43 bool isSVGImageChromeClient() const override; 43 bool isSVGImageChromeClient() const override;
44 44
45 SVGImage* image() const { return m_image; } 45 SVGImage* image() const { return m_image; }
46 46
47 void suspendAnimation();
48 void resumeAnimation();
49
47 private: 50 private:
48 explicit SVGImageChromeClient(SVGImage*); 51 explicit SVGImageChromeClient(SVGImage*);
49 52
50 void chromeDestroyed() override; 53 void chromeDestroyed() override;
51 void invalidateRect(const IntRect&) override; 54 void invalidateRect(const IntRect&) override;
52 void scheduleAnimation(Widget*) override; 55 void scheduleAnimation(Widget*) override;
53 56
54 void animationTimerFired(Timer<SVGImageChromeClient>*); 57 void animationTimerFired(Timer<SVGImageChromeClient>*);
55 58
56 SVGImage* m_image; 59 SVGImage* m_image;
57 Timer<SVGImageChromeClient> m_animationTimer; 60 Timer<SVGImageChromeClient> m_animationTimer;
61 enum {
62 Running,
63 Suspended,
64 SuspendedWithFramePending,
65 } m_timelineState;
58 }; 66 };
59 67
60 DEFINE_TYPE_CASTS(SVGImageChromeClient, ChromeClient, client, client->isSVGImage ChromeClient(), client.isSVGImageChromeClient()); 68 DEFINE_TYPE_CASTS(SVGImageChromeClient, ChromeClient, client, client->isSVGImage ChromeClient(), client.isSVGImageChromeClient());
61 69
62 } // namespace blink 70 } // namespace blink
63 71
64 #endif // SVGImageChromeClient_h 72 #endif // SVGImageChromeClient_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698