Changeset 174367 in webkit
- Timestamp:
- Oct 6, 2014 2:52:42 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r174351 r174367 1 2014-10-06 Simon Fraser <simon.fraser@apple.com> 2 3 Don't attempt to paint into zero-sized backing store 4 https://bugs.webkit.org/show_bug.cgi?id=137465 5 6 Reviewed by Tim Horton. 7 8 Page scale could cause the backing store for a small composited element to become empty, 9 in which case we'd try to allocate, and paint into a graphics context with no surface 10 behind it. 11 12 Fix by bailing from RemoteLayerBackingStore::display() when checking the backing store 13 size after accounting for scale. 14 15 * Shared/mac/RemoteLayerBackingStore.h: 16 * Shared/mac/RemoteLayerBackingStore.mm: 17 (WebKit::RemoteLayerBackingStore::backingStoreSize): 18 (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): 19 (WebKit::RemoteLayerBackingStore::display): 20 1 21 2014-10-06 Christophe Dumez <cdumez@apple.com> 2 22 -
trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.h
r170923 r174367 97 97 void clearBackingStore(); 98 98 void swapToValidFrontBuffer(); 99 100 WebCore::IntSize backingStoreSize() const; 99 101 100 102 PlatformCALayerRemote* m_layer; -
trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm
r173710 r174367 172 172 } 173 173 174 void RemoteLayerBackingStore::swapToValidFrontBuffer() 174 IntSize RemoteLayerBackingStore::backingStoreSize() const 175 175 { 176 176 FloatSize scaledSize = m_size; 177 177 scaledSize.scale(m_scale); 178 IntSize expandedScaledSize = roundedIntSize(scaledSize); 178 return roundedIntSize(scaledSize); 179 } 180 181 void RemoteLayerBackingStore::swapToValidFrontBuffer() 182 { 183 IntSize expandedScaledSize = backingStoreSize(); 179 184 180 185 #if USE(IOSURFACE) … … 216 221 setBufferVolatility(BufferType::Front, false); 217 222 218 if (m_dirtyRegion.isEmpty() || m_size.isEmpty()) 223 IntSize expandedScaledSize = backingStoreSize(); 224 225 if (m_dirtyRegion.isEmpty() || expandedScaledSize.isEmpty()) 219 226 return false; 220 227 … … 228 235 } 229 236 230 FloatSize scaledSize = m_size;231 scaledSize.scale(m_scale);232 IntSize expandedScaledSize = roundedIntSize(scaledSize);233 237 IntRect expandedScaledLayerBounds(IntPoint(), expandedScaledSize); 234 238 bool willPaintEntireBackingStore = m_dirtyRegion.contains(layerBounds);
Note: See TracChangeset
for help on using the changeset viewer.