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

Unified Diff: third_party/WebKit/Source/core/fetch/ImageResourceObserver.h

Issue 2555103004: ImageResource: remove unnecessary vector copying during iteration. (Closed)
Patch Set: add comments Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ImageResource.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/fetch/ImageResourceObserver.h
diff --git a/third_party/WebKit/Source/core/fetch/ImageResourceObserver.h b/third_party/WebKit/Source/core/fetch/ImageResourceObserver.h
index b1f5da8ede5cd434f9605d313c5444ec8011b99d..826a781a4ee24539dd6b0c0ff44f34d5411588d9 100644
--- a/third_party/WebKit/Source/core/fetch/ImageResourceObserver.h
+++ b/third_party/WebKit/Source/core/fetch/ImageResourceObserver.h
@@ -51,9 +51,13 @@ class CORE_EXPORT ImageResourceObserver {
// example would not render the image, but LayoutImages would (assuming they
// have visibility: visible and their layout tree isn't hidden e.g., in the
// b/f cache or in a background tab).
+ //
+ // An implementation of this method is not allowed to add or remove
+ // ImageResource observers.
virtual bool willRenderImage() { return false; }
- // Called to get imageAnimation policy from settings
+ // Called to get imageAnimation policy from settings. An implementation of
+ // this method is not allowed to add or remove ImageResource observers.
virtual bool getImageAnimationPolicy(ImageAnimationPolicy&) { return false; }
virtual ResourcePriority computeResourcePriority() const {
yhirano 2016/12/08 07:29:21 This function has the same restriction.
sof 2016/12/08 07:32:51 Done.
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ImageResource.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698