| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 class Image : public RefCounted<Image> { | 54 class Image : public RefCounted<Image> { |
| 55 friend class GeneratedImage; | 55 friend class GeneratedImage; |
| 56 friend class CrossfadeGeneratedImage; | 56 friend class CrossfadeGeneratedImage; |
| 57 friend class GeneratorGeneratedImage; | 57 friend class GeneratorGeneratedImage; |
| 58 friend class GraphicsContext; | 58 friend class GraphicsContext; |
| 59 | 59 |
| 60 public: | 60 public: |
| 61 virtual ~Image(); | 61 virtual ~Image(); |
| 62 | 62 |
| 63 static PassRefPtr<Image> create(ImageObserver* = 0); | |
| 64 static PassRefPtr<Image> loadPlatformResource(const char* name); | 63 static PassRefPtr<Image> loadPlatformResource(const char* name); |
| 65 static bool supportsType(const String&); | 64 static bool supportsType(const String&); |
| 66 | 65 |
| 67 virtual bool isSVGImage() const { return false; } | 66 virtual bool isSVGImage() const { return false; } |
| 68 virtual bool isBitmapImage() const { return false; } | 67 virtual bool isBitmapImage() const { return false; } |
| 69 virtual bool currentFrameKnownToBeOpaque() = 0; | 68 virtual bool currentFrameKnownToBeOpaque() = 0; |
| 70 | 69 |
| 71 // Derived classes should override this if they can assure that | 70 // Derived classes should override this if they can assure that |
| 72 // the image contains only resources from its own security origin. | 71 // the image contains only resources from its own security origin. |
| 73 virtual bool hasSingleSecurityOrigin() const { return false; } | 72 virtual bool hasSingleSecurityOrigin() const { return false; } |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 virtual Color solidColor() const { return Color(); } | 135 virtual Color solidColor() const { return Color(); } |
| 137 | 136 |
| 138 private: | 137 private: |
| 139 RefPtr<SharedBuffer> m_encodedImageData; | 138 RefPtr<SharedBuffer> m_encodedImageData; |
| 140 ImageObserver* m_imageObserver; | 139 ImageObserver* m_imageObserver; |
| 141 }; | 140 }; |
| 142 | 141 |
| 143 } | 142 } |
| 144 | 143 |
| 145 #endif | 144 #endif |
| OLD | NEW |