equal
deleted
inserted
replaced
96 m_image->resetAnimation(); |
96 m_image->resetAnimation(); |
97 } |
97 } |
98 |
98 |
99 static Image* brokenImage() |
99 static Image* brokenImage() |
100 { |
100 { |
101 static OwnPtr<Image*> brokenImage; |
101 static Image* brokenImage; |
102 if (!brokenImage) { |
102 if (!brokenImage) { |
103 brokenImage.set(Image::loadPlatformResource("missingImage")); |
103 brokenImage = Image::loadPlatformResource("missingImage"); |
104 } |
104 } |
105 Image* ret = brokenImage.get(); |
105 return brokenImage; |
106 return ret; |
|
107 } |
106 } |
108 |
107 |
109 static Image* nullImage() |
108 static Image* nullImage() |
110 { |
109 { |
111 static BitmapImage nullImage; |
110 static BitmapImage nullImage; |
186 bool sizeAvailable = false; |
185 bool sizeAvailable = false; |
187 |
186 |
188 // Have the image update its data from its internal buffer. |
187 // Have the image update its data from its internal buffer. |
189 // It will not do anything now, but will delay decoding until |
188 // It will not do anything now, but will delay decoding until |
190 // queried for info (like size or specific image frames). |
189 // queried for info (like size or specific image frames). |
191 sizeAvailable = m_image->setData(m_data, allDataReceived); |
190 if(m_image) |
|
191 sizeAvailable = m_image->setData(m_data, allDataReceived); |
192 |
192 |
193 // Go ahead and tell our observers to try to draw if we have either |
193 // Go ahead and tell our observers to try to draw if we have either |
194 // received all the data or the size is known. Each chunk from the |
194 // received all the data or the size is known. Each chunk from the |
195 // network causes observers to repaint, which will force that chunk |
195 // network causes observers to repaint, which will force that chunk |
196 // to decode. |
196 // to decode. |