| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 virtual bool isBitmapImage() const { return false; } | 74 virtual bool isBitmapImage() const { return false; } |
| 75 | 75 |
| 76 // To increase accuracy of currentFrameKnownToBeOpaque() it may, | 76 // To increase accuracy of currentFrameKnownToBeOpaque() it may, |
| 77 // for applicable image types, be told to pre-cache metadata for | 77 // for applicable image types, be told to pre-cache metadata for |
| 78 // the current frame. Since this may initiate a deferred image | 78 // the current frame. Since this may initiate a deferred image |
| 79 // decoding, PreCacheMetadata requires a InspectorPaintImageEvent | 79 // decoding, PreCacheMetadata requires a InspectorPaintImageEvent |
| 80 // during call. | 80 // during call. |
| 81 enum MetadataMode { UseCurrentMetadata, PreCacheMetadata }; | 81 enum MetadataMode { UseCurrentMetadata, PreCacheMetadata }; |
| 82 virtual bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata)
= 0; | 82 virtual bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata)
= 0; |
| 83 | 83 |
| 84 virtual bool currentFrameIsComplete() { return false; } | 84 virtual bool currentFrameIsFullyReceived() { return false; } |
| 85 virtual bool currentFrameIsLazyDecoded() { return false; } | 85 virtual bool currentFrameIsLazyDecoded() { return false; } |
| 86 virtual bool isTextureBacked(); | 86 virtual bool isTextureBacked(); |
| 87 | 87 |
| 88 // Derived classes should override this if they can assure that the current | 88 // Derived classes should override this if they can assure that the current |
| 89 // image frame contains only resources from its own security origin. | 89 // image frame contains only resources from its own security origin. |
| 90 virtual bool currentFrameHasSingleSecurityOrigin() const { return false; } | 90 virtual bool currentFrameHasSingleSecurityOrigin() const { return false; } |
| 91 | 91 |
| 92 static Image* nullImage(); | 92 static Image* nullImage(); |
| 93 bool isNull() const { return size().isEmpty(); } | 93 bool isNull() const { return size().isEmpty(); } |
| 94 | 94 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 UntracedMember<ImageObserver> m_imageObserver; | 181 UntracedMember<ImageObserver> m_imageObserver; |
| 182 bool m_imageObserverDisabled; | 182 bool m_imageObserverDisabled; |
| 183 }; | 183 }; |
| 184 | 184 |
| 185 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ | 185 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ |
| 186 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), image.is##t
ypeName()) | 186 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), image.is##t
ypeName()) |
| 187 | 187 |
| 188 } // namespace blink | 188 } // namespace blink |
| 189 | 189 |
| 190 #endif | 190 #endif |
| OLD | NEW |