Changeset 193382 in webkit
- Timestamp:
- Dec 3, 2015, 3:44:52 PM (9 years ago)
- Location:
- trunk/Source
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r193378 r193382 1 2015-12-03 Simon Fraser <simon.fraser@apple.com> 2 3 Have layer memory use consult the backing store format 4 https://bugs.webkit.org/show_bug.cgi?id=151827 5 rdar://problem/23746497 6 7 Reviewed by Dean Jackson. 8 9 When computing the backing store memory size, take the pixel format into account, 10 rather than assuming 4 bytes per pixel. 11 12 * platform/graphics/ca/GraphicsLayerCA.cpp: 13 * platform/graphics/ca/PlatformCALayer.h: 14 1 15 2015-12-03 Anders Carlsson <andersca@apple.com> 2 16 -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
r192853 r193382 3776 3776 return 0; 3777 3777 3778 return 4.0* size().width() * m_layer->contentsScale() * size().height() * m_layer->contentsScale();3778 return m_layer->backingStoreBytesPerPixel() * size().width() * m_layer->contentsScale() * size().height() * m_layer->contentsScale(); 3779 3779 } 3780 3780 -
trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.h
r191243 r193382 231 231 232 232 static void flipContext(CGContextRef, CGFloat height); 233 234 virtual unsigned backingStoreBytesPerPixel() const { return 4; } 233 235 234 236 #if PLATFORM(WIN) -
trunk/Source/WebKit2/ChangeLog
r193381 r193382 1 2015-12-03 Simon Fraser <simon.fraser@apple.com> 2 3 Have layer memory use consult the backing store format 4 https://bugs.webkit.org/show_bug.cgi?id=151827 5 rdar://problem/23746497 6 7 Reviewed by Dean Jackson. 8 9 When computing the backing store memory size, take the pixel format into account, 10 rather than assuming 4 bytes per pixel. 11 12 * Shared/mac/RemoteLayerBackingStore.h: 13 * Shared/mac/RemoteLayerBackingStore.mm: 14 (WebKit::RemoteLayerBackingStore::bytesPerPixel): 15 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp: 16 (WebKit::PlatformCALayerRemote::backingStoreBytesPerPixel): 17 * WebProcess/WebPage/mac/PlatformCALayerRemote.h: 18 1 19 2015-12-03 Jer Noble <jer.noble@apple.com> 2 20 -
trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.h
r180799 r193382 62 62 bool acceleratesDrawing() const { return m_acceleratesDrawing; } 63 63 bool isOpaque() const { return m_isOpaque; } 64 unsigned bytesPerPixel() const; 64 65 65 66 PlatformCALayerRemote* layer() const { return m_layer; } -
trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm
r192701 r193382 188 188 } 189 189 190 unsigned RemoteLayerBackingStore::bytesPerPixel() const 191 { 192 #if USE(IOSURFACE) 193 WebCore::IOSurface::Format format = bufferFormat(m_isOpaque); 194 switch (format) { 195 case IOSurface::Format::RGBA: return 4; 196 case IOSurface::Format::YUV422: return 2; 197 case IOSurface::Format::RGB10: return 4; 198 case IOSurface::Format::RGB10A8: return 5; 199 } 200 #endif 201 return 4; 202 } 203 190 204 void RemoteLayerBackingStore::swapToValidFrontBuffer() 191 205 { -
trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp
r190292 r193382 783 783 } 784 784 785 unsigned PlatformCALayerRemote::backingStoreBytesPerPixel() const 786 { 787 if (!m_properties.backingStore) 788 return 4; 789 790 return m_properties.backingStore->bytesPerPixel(); 791 } 792 785 793 LayerPool& PlatformCALayerRemote::layerPool() 786 794 { -
trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h
r190292 r193382 173 173 virtual uint32_t hostingContextID(); 174 174 175 virtual unsigned backingStoreBytesPerPixel() const override; 176 175 177 void setClonedLayer(const PlatformCALayer*); 176 178
Note:
See TracChangeset
for help on using the changeset viewer.