OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |