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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/Image.h

Issue 1962563002: Fix ImageDecoder::frameIsCompleteAtIndex - fully received instead of decoded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better check in unit test Created 4 years, 6 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) 2006 Samuel Weinig (sam.weinig@gmail.com) 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 virtual bool isBitmapImage() const { return false; } 72 virtual bool isBitmapImage() const { return false; }
73 73
74 // To increase accuracy of currentFrameKnownToBeOpaque() it may, 74 // To increase accuracy of currentFrameKnownToBeOpaque() it may,
75 // for applicable image types, be told to pre-cache metadata for 75 // for applicable image types, be told to pre-cache metadata for
76 // the current frame. Since this may initiate a deferred image 76 // the current frame. Since this may initiate a deferred image
77 // decoding, PreCacheMetadata requires a InspectorPaintImageEvent 77 // decoding, PreCacheMetadata requires a InspectorPaintImageEvent
78 // during call. 78 // during call.
79 enum MetadataMode { UseCurrentMetadata, PreCacheMetadata }; 79 enum MetadataMode { UseCurrentMetadata, PreCacheMetadata };
80 virtual bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata) = 0; 80 virtual bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata) = 0;
81 81
82 virtual bool currentFrameIsComplete() { return false; } 82 virtual bool currentFrameIsFullyReceived() { return false; }
83 virtual bool currentFrameIsLazyDecoded() { return false; } 83 virtual bool currentFrameIsLazyDecoded() { return false; }
84 virtual bool isTextureBacked(); 84 virtual bool isTextureBacked();
85 85
86 // Derived classes should override this if they can assure that the current 86 // Derived classes should override this if they can assure that the current
87 // image frame contains only resources from its own security origin. 87 // image frame contains only resources from its own security origin.
88 virtual bool currentFrameHasSingleSecurityOrigin() const { return false; } 88 virtual bool currentFrameHasSingleSecurityOrigin() const { return false; }
89 89
90 static Image* nullImage(); 90 static Image* nullImage();
91 bool isNull() const { return size().isEmpty(); } 91 bool isNull() const { return size().isEmpty(); }
92 92
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 UntracedMember<ImageObserver> m_imageObserver; 167 UntracedMember<ImageObserver> m_imageObserver;
168 bool m_imageObserverDisabled; 168 bool m_imageObserverDisabled;
169 }; 169 };
170 170
171 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ 171 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \
172 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), image.is##t ypeName()) 172 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), image.is##t ypeName())
173 173
174 } // namespace blink 174 } // namespace blink
175 175
176 #endif 176 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698