summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/BitmapImage.h
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-06-02 12:07:03 +0100
committerBen Murdoch <benm@google.com>2011-06-10 10:47:21 +0100
commit2daae5fd11344eaa88a0d92b0f6d65f8d2255c00 (patch)
treee4964fbd1cb70599f7718ff03e50ea1dab33890b /Source/WebCore/platform/graphics/BitmapImage.h
parent87bdf0060a247bfbe668342b87e0874182e0ffa9 (diff)
downloadexternal_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.zip
external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.gz
external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.bz2
Merge WebKit at r84325: Initial merge by git.
Change-Id: Ic1a909300ecc0a13ddc6b4e784371d2ac6e3d59b
Diffstat (limited to 'Source/WebCore/platform/graphics/BitmapImage.h')
-rw-r--r--Source/WebCore/platform/graphics/BitmapImage.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/Source/WebCore/platform/graphics/BitmapImage.h b/Source/WebCore/platform/graphics/BitmapImage.h
index c8cf0ab..8d9cd94 100644
--- a/Source/WebCore/platform/graphics/BitmapImage.h
+++ b/Source/WebCore/platform/graphics/BitmapImage.h
@@ -53,11 +53,11 @@ namespace WebCore {
struct FrameData;
}
-// This complicated-looking declaration tells the FrameData Vector that it should copy without
-// invoking our constructor or destructor. This allows us to have a vector even for a struct
-// that's not copyable.
namespace WTF {
- template<> struct VectorTraits<WebCore::FrameData> : public SimpleClassVectorTraits {};
+ // FIXME: This declaration gives FrameData a default constructor that zeroes
+ // all its data members, even though FrameData's default constructor defined
+ // below does not zero all its data members. One of these must be wrong!
+ template<> struct VectorTraits<WebCore::FrameData> : public SimpleClassVectorTraits { };
}
namespace WebCore {
@@ -139,8 +139,9 @@ public:
virtual CFDataRef getTIFFRepresentation();
#endif
-#if PLATFORM(CG)
+#if USE(CG)
virtual CGImageRef getCGImageRef();
+ virtual CGImageRef getFirstCGImageRefOfSize(const IntSize&);
#endif
#if PLATFORM(WIN) || (PLATFORM(QT) && OS(WINDOWS))
@@ -160,6 +161,14 @@ public:
#endif
virtual NativeImagePtr nativeImageForCurrentFrame() { return frameAtIndex(currentFrame()); }
+ bool frameHasAlphaAtIndex(size_t);
+
+#if !ASSERT_DISABLED
+ bool notSolidColor()
+ {
+ return size().width() != 1 || size().height() != 1 || frameCount() > 1;
+ }
+#endif
protected:
enum RepetitionCountStatus {
@@ -190,7 +199,6 @@ protected:
NativeImagePtr frameAtIndex(size_t);
bool frameIsCompleteAtIndex(size_t);
float frameDurationAtIndex(size_t);
- bool frameHasAlphaAtIndex(size_t);
// Decodes and caches a frame. Never accessed except internally.
void cacheFrame(size_t index);