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

Unified Diff: third_party/WebKit/Source/platform/graphics/Image.h

Issue 1482953002: Drop dependency on LayoutObject in fetch/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile fix Created 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/Image.h
diff --git a/third_party/WebKit/Source/platform/graphics/Image.h b/third_party/WebKit/Source/platform/graphics/Image.h
index 88f4301946a7dc06bdc09832143673a92afcc1fe..da3936c979e7b35a6ee6c3599676fa78d81c4fd8 100644
--- a/third_party/WebKit/Source/platform/graphics/Image.h
+++ b/third_party/WebKit/Source/platform/graphics/Image.h
@@ -70,7 +70,15 @@ public:
virtual bool isSVGImage() const { return false; }
virtual bool isBitmapImage() const { return false; }
- virtual bool currentFrameKnownToBeOpaque() = 0;
+
+ // To increase accuracy of currentFrameKnownToBeOpaque() it may,
+ // for applicable image types, be told to pre-cache metadata for
+ // the current frame. Since this may initiate a deferred image
+ // decoding, PreCacheMetadata requires a InspectorPaintImageEvent
+ // during call.
+ enum MetadataMode { UseCurrentMetadata, PreCacheMetadata };
+ virtual bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata) = 0;
+
virtual bool currentFrameIsComplete() { return false; }
virtual bool currentFrameIsLazyDecoded() { return false; }
virtual bool isTextureBacked();

Powered by Google App Engine
This is Rietveld 408576698