Changeset 94024 in webkit
- Timestamp:
- Aug 29, 2011, 3:52:36 PM (15 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/cg/ImageBufferCG.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r94019 r94024 1 2011-08-29 Matthew Delaney <mdelaney@apple.com> 2 3 [CG] ImageBufferCG should handle IOSurface allocation failure gracefully 4 https://bugs.webkit.org/show_bug.cgi?id=67099 5 6 Reviewed by Simon Fraser. 7 8 No new tests. Testing the "fallback to old path" behavior is not easily testable. 9 10 * platform/graphics/cg/ImageBufferCG.cpp: Rearranged backing store creation to fall back to 11 old path if IOSurface creation path fails. 12 (WebCore::ImageBuffer::ImageBuffer): 13 1 14 2011-08-29 Cary Clark <caryclark@google.com> 2 15 -
trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp
r92068 r94024 138 138 139 139 RetainPtr<CGContextRef> cgContext; 140 if (m_accelerateRendering) { 141 #if USE(IOSURFACE_CANVAS_BACKING_STORE) 142 m_data.m_surface = createIOSurface(size); 143 cgContext.adoptCF(wkIOSurfaceContextCreate(m_data.m_surface.get(), size.width(), size.height(), m_data.m_colorSpace)); 144 #endif 145 if (!cgContext) 146 m_accelerateRendering = false; // If allocation fails, fall back to non-accelerated path. 147 } 148 140 149 if (!m_accelerateRendering) { 141 150 if (!tryFastCalloc(size.height(), bytesPerRow).getValue(m_data.m_data)) … … 147 156 // Create a live image that wraps the data. 148 157 m_data.m_dataProvider.adoptCF(CGDataProviderCreateWithData(0, m_data.m_data, dataSize, releaseImageData)); 149 } else {150 #if USE(IOSURFACE_CANVAS_BACKING_STORE)151 m_data.m_surface = createIOSurface(size);152 cgContext.adoptCF(wkIOSurfaceContextCreate(m_data.m_surface.get(), size.width(), size.height(), m_data.m_colorSpace));153 #else154 m_accelerateRendering = false; // Force to false on older platforms155 #endif156 158 } 157 159
Note:
See TracChangeset
for help on using the changeset viewer.