| 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 17 matching lines...) Expand all Loading... |
| 28 #define Image_h | 28 #define Image_h |
| 29 | 29 |
| 30 #include "platform/PlatformExport.h" | 30 #include "platform/PlatformExport.h" |
| 31 #include "platform/geometry/IntRect.h" | 31 #include "platform/geometry/IntRect.h" |
| 32 #include "platform/graphics/Color.h" | 32 #include "platform/graphics/Color.h" |
| 33 #include "platform/graphics/GraphicsTypes.h" | 33 #include "platform/graphics/GraphicsTypes.h" |
| 34 #include "platform/graphics/ImageAnimationPolicy.h" | 34 #include "platform/graphics/ImageAnimationPolicy.h" |
| 35 #include "platform/graphics/ImageOrientation.h" | 35 #include "platform/graphics/ImageOrientation.h" |
| 36 #include "third_party/skia/include/core/SkCanvas.h" | 36 #include "third_party/skia/include/core/SkCanvas.h" |
| 37 #include "wtf/Assertions.h" | 37 #include "wtf/Assertions.h" |
| 38 #include "wtf/Noncopyable.h" |
| 38 #include "wtf/PassRefPtr.h" | 39 #include "wtf/PassRefPtr.h" |
| 39 #include "wtf/RefCounted.h" | 40 #include "wtf/RefCounted.h" |
| 40 #include "wtf/RefPtr.h" | 41 #include "wtf/RefPtr.h" |
| 41 #include "wtf/text/WTFString.h" | 42 #include "wtf/text/WTFString.h" |
| 42 | 43 |
| 43 class SkBitmap; | 44 class SkBitmap; |
| 44 class SkImage; | 45 class SkImage; |
| 45 | 46 |
| 46 namespace blink { | 47 namespace blink { |
| 47 | 48 |
| 48 class FloatPoint; | 49 class FloatPoint; |
| 49 class FloatRect; | 50 class FloatRect; |
| 50 class FloatSize; | 51 class FloatSize; |
| 51 class GraphicsContext; | 52 class GraphicsContext; |
| 52 class Length; | 53 class Length; |
| 53 class SharedBuffer; | 54 class SharedBuffer; |
| 54 class Image; | 55 class Image; |
| 55 | 56 |
| 56 // This class gets notified when an image creates or destroys decoded frames and
when it advances animation frames. | 57 // This class gets notified when an image creates or destroys decoded frames and
when it advances animation frames. |
| 57 class ImageObserver; | 58 class ImageObserver; |
| 58 | 59 |
| 59 class PLATFORM_EXPORT Image : public RefCounted<Image> { | 60 class PLATFORM_EXPORT Image : public RefCounted<Image> { |
| 60 friend class GeneratedImage; | 61 friend class GeneratedImage; |
| 61 friend class CrossfadeGeneratedImage; | 62 friend class CrossfadeGeneratedImage; |
| 62 friend class GradientGeneratedImage; | 63 friend class GradientGeneratedImage; |
| 63 friend class GraphicsContext; | 64 friend class GraphicsContext; |
| 65 WTF_MAKE_NONCOPYABLE(Image); |
| 64 | 66 |
| 65 public: | 67 public: |
| 66 virtual ~Image(); | 68 virtual ~Image(); |
| 67 | 69 |
| 68 static PassRefPtr<Image> loadPlatformResource(const char* name); | 70 static PassRefPtr<Image> loadPlatformResource(const char* name); |
| 69 static bool supportsType(const String&); | 71 static bool supportsType(const String&); |
| 70 | 72 |
| 71 virtual bool isSVGImage() const { return false; } | 73 virtual bool isSVGImage() const { return false; } |
| 72 virtual bool isBitmapImage() const { return false; } | 74 virtual bool isBitmapImage() const { return false; } |
| 73 | 75 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 RefPtr<SharedBuffer> m_encodedImageData; | 168 RefPtr<SharedBuffer> m_encodedImageData; |
| 167 ImageObserver* m_imageObserver; | 169 ImageObserver* m_imageObserver; |
| 168 }; | 170 }; |
| 169 | 171 |
| 170 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ | 172 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ |
| 171 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), image.is##t
ypeName()) | 173 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), image.is##t
ypeName()) |
| 172 | 174 |
| 173 } // namespace blink | 175 } // namespace blink |
| 174 | 176 |
| 175 #endif | 177 #endif |
| OLD | NEW |