| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 virtual ~Image(); | 66 virtual ~Image(); |
| 67 | 67 |
| 68 static PassRefPtr<Image> loadPlatformResource(const char* name); | 68 static PassRefPtr<Image> loadPlatformResource(const char* name); |
| 69 static bool supportsType(const String&); | 69 static bool supportsType(const String&); |
| 70 | 70 |
| 71 virtual bool isSVGImage() const { return false; } | 71 virtual bool isSVGImage() const { return false; } |
| 72 virtual bool isBitmapImage() const { return false; } | 72 virtual bool isBitmapImage() const { return false; } |
| 73 virtual bool currentFrameKnownToBeOpaque() = 0; | 73 virtual bool currentFrameKnownToBeOpaque() = 0; |
| 74 virtual bool currentFrameIsComplete() { return false; } | 74 virtual bool currentFrameIsComplete() { return false; } |
| 75 virtual bool currentFrameIsLazyDecoded() { return false; } | 75 virtual bool currentFrameIsLazyDecoded() { return false; } |
| 76 virtual bool isTextureBacked(); |
| 76 | 77 |
| 77 // Derived classes should override this if they can assure that the current | 78 // Derived classes should override this if they can assure that the current |
| 78 // image frame contains only resources from its own security origin. | 79 // image frame contains only resources from its own security origin. |
| 79 virtual bool currentFrameHasSingleSecurityOrigin() const { return false; } | 80 virtual bool currentFrameHasSingleSecurityOrigin() const { return false; } |
| 80 | 81 |
| 81 static Image* nullImage(); | 82 static Image* nullImage(); |
| 82 bool isNull() const { return size().isEmpty(); } | 83 bool isNull() const { return size().isEmpty(); } |
| 83 | 84 |
| 84 virtual void setContainerSize(const IntSize&) { } | 85 virtual void setContainerSize(const IntSize&) { } |
| 85 virtual bool usesContainerSize() const { return false; } | 86 virtual bool usesContainerSize() const { return false; } |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 RefPtr<SharedBuffer> m_encodedImageData; | 158 RefPtr<SharedBuffer> m_encodedImageData; |
| 158 ImageObserver* m_imageObserver; | 159 ImageObserver* m_imageObserver; |
| 159 }; | 160 }; |
| 160 | 161 |
| 161 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ | 162 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ |
| 162 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), image.is##t
ypeName()) | 163 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), image.is##t
ypeName()) |
| 163 | 164 |
| 164 } // namespace blink | 165 } // namespace blink |
| 165 | 166 |
| 166 #endif | 167 #endif |
| OLD | NEW |