111 |
111 |
112 virtual QImage* buffer(); |
112 virtual QImage* buffer(); |
113 |
113 |
114 inline int width() const { return w; } |
114 inline int width() const { return w; } |
115 inline int height() const { return h; } |
115 inline int height() const { return h; } |
116 inline int numColors() const { return metric(QPaintDevice::PdmNumColors); } |
116 QT_DEPRECATED inline int numColors() const { return metric(QPaintDevice::PdmNumColors); } |
|
117 inline int colorCount() const { return metric(QPaintDevice::PdmNumColors); } |
117 inline int depth() const { return d; } |
118 inline int depth() const { return d; } |
118 inline bool isNull() const { return is_null; } |
119 inline bool isNull() const { return is_null; } |
119 |
120 |
120 #if defined(Q_OS_SYMBIAN) |
121 #if defined(Q_OS_SYMBIAN) |
121 virtual void* toNativeType(NativeType type); |
122 virtual void* toNativeType(NativeType type); |
122 virtual void fromNativeType(void* pixmap, NativeType type); |
123 virtual void fromNativeType(void* pixmap, NativeType type); |
123 #endif |
124 #endif |
|
125 |
|
126 static QPixmapData *create(int w, int h, PixelType type); |
124 |
127 |
125 protected: |
128 protected: |
126 void setSerialNumber(int serNo); |
129 void setSerialNumber(int serNo); |
127 int w; |
130 int w; |
128 int h; |
131 int h; |
129 int d; |
132 int d; |
130 bool is_null; |
133 bool is_null; |
131 |
134 |
132 private: |
135 private: |
133 friend class QPixmap; |
136 friend class QPixmap; |
134 friend class QGLContextPrivate; |
|
135 friend class QX11PixmapData; |
137 friend class QX11PixmapData; |
136 friend class QS60PixmapData; |
138 friend class QS60PixmapData; |
|
139 friend class QImagePixmapCleanupHooks; // Needs to set is_cached |
137 friend class QGLTextureCache; //Needs to check the reference count |
140 friend class QGLTextureCache; //Needs to check the reference count |
138 friend class QExplicitlySharedDataPointer<QPixmapData>; |
141 friend class QExplicitlySharedDataPointer<QPixmapData>; |
139 friend bool qt_createEGLSurfaceForPixmap(QPixmapData*, bool); // Needs to set is_cached |
|
140 |
142 |
141 QAtomicInt ref; |
143 QAtomicInt ref; |
142 int detach_no; |
144 int detach_no; |
143 |
145 |
144 PixelType type; |
146 PixelType type; |