| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 54 |
| 55 class PLATFORM_EXPORT Image : public RefCounted<Image> { | 55 class PLATFORM_EXPORT Image : public RefCounted<Image> { |
| 56 friend class GeneratedImage; | 56 friend class GeneratedImage; |
| 57 friend class CrossfadeGeneratedImage; | 57 friend class CrossfadeGeneratedImage; |
| 58 friend class GradientGeneratedImage; | 58 friend class GradientGeneratedImage; |
| 59 friend class GraphicsContext; | 59 friend class GraphicsContext; |
| 60 | 60 |
| 61 public: | 61 public: |
| 62 virtual ~Image(); | 62 virtual ~Image(); |
| 63 | 63 |
| 64 static PassRefPtr<Image> loadPlatformResource(const char* name); | |
| 65 | |
| 66 virtual bool isBitmapImage() const { return false; } | 64 virtual bool isBitmapImage() const { return false; } |
| 67 virtual bool currentFrameKnownToBeOpaque() = 0; | 65 virtual bool currentFrameKnownToBeOpaque() = 0; |
| 68 | 66 |
| 69 static Image* nullImage(); | 67 static Image* nullImage(); |
| 70 bool isNull() const { return size().isEmpty(); } | 68 bool isNull() const { return size().isEmpty(); } |
| 71 | 69 |
| 72 virtual void setContainerSize(const IntSize&) { } | 70 virtual void setContainerSize(const IntSize&) { } |
| 73 virtual bool usesContainerSize() const { return false; } | 71 virtual bool usesContainerSize() const { return false; } |
| 74 virtual bool hasRelativeWidth() const { return false; } | 72 virtual bool hasRelativeWidth() const { return false; } |
| 75 virtual bool hasRelativeHeight() const { return false; } | 73 virtual bool hasRelativeHeight() const { return false; } |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 RefPtr<SharedBuffer> m_encodedImageData; | 136 RefPtr<SharedBuffer> m_encodedImageData; |
| 139 ImageObserver* m_imageObserver; | 137 ImageObserver* m_imageObserver; |
| 140 }; | 138 }; |
| 141 | 139 |
| 142 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ | 140 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ |
| 143 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), image.is##t
ypeName()) | 141 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), image.is##t
ypeName()) |
| 144 | 142 |
| 145 } // namespace blink | 143 } // namespace blink |
| 146 | 144 |
| 147 #endif // SKY_ENGINE_PLATFORM_GRAPHICS_IMAGE_H_ | 145 #endif // SKY_ENGINE_PLATFORM_GRAPHICS_IMAGE_H_ |
| OLD | NEW |