Changeset 76072 in webkit
- Timestamp:
- Jan 18, 2011 3:08:18 PM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r76069 r76072 1 2011-01-18 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Darin Adler. 4 5 Factor code to create the backing store bitmap context out into a new function 6 https://bugs.webkit.org/show_bug.cgi?id=52670 7 8 * UIProcess/BackingStore.h: 9 * UIProcess/mac/BackingStoreMac.mm: 10 (WebKit::BackingStore::backingStoreContext): 11 Create the backing store context. 12 13 (WebKit::BackingStore::incorporateUpdate): 14 Call backingStoreContext. 15 16 (WebKit::BackingStore::scroll): 17 Assert that the context is not null. 18 1 19 2011-01-18 Anders Carlsson <andersca@apple.com> 2 20 -
trunk/Source/WebKit2/UIProcess/BackingStore.h
r76061 r76072 66 66 67 67 #if PLATFORM(MAC) 68 CGContextRef backingStoreContext(); 69 68 70 RetainPtr<CGContextRef> m_bitmapContext; 69 71 #endif -
trunk/Source/WebKit2/UIProcess/mac/BackingStoreMac.mm
r76061 r76072 42 42 } 43 43 44 void BackingStore::incorporateUpdate(const UpdateInfo& updateInfo)44 CGContextRef BackingStore::backingStoreContext() 45 45 { 46 ASSERT(m_size == updateInfo.viewSize);47 48 RefPtr<ShareableBitmap> bitmap = ShareableBitmap::create(updateInfo.updateRectBounds.size(), updateInfo.bitmapHandle);49 if (!bitmap)50 return;51 52 46 if (!m_bitmapContext) { 53 47 RetainPtr<CGColorSpaceRef> colorSpace(AdoptCF, CGColorSpaceCreateDeviceRGB()); … … 60 54 } 61 55 56 return m_bitmapContext.get(); 57 } 58 59 void BackingStore::incorporateUpdate(const UpdateInfo& updateInfo) 60 { 61 ASSERT(m_size == updateInfo.viewSize); 62 63 RefPtr<ShareableBitmap> bitmap = ShareableBitmap::create(updateInfo.updateRectBounds.size(), updateInfo.bitmapHandle); 64 if (!bitmap) 65 return; 66 67 CGContextRef context = backingStoreContext(); 68 62 69 scroll(updateInfo.scrollRect, updateInfo.scrollOffset); 63 70 64 71 IntPoint updateRectLocation = updateInfo.updateRectBounds.location(); 65 72 66 GraphicsContext graphicsContext( m_bitmapContext.get());73 GraphicsContext graphicsContext(context); 67 74 68 75 // Paint all update rects. … … 81 88 return; 82 89 90 ASSERT(m_bitmapContext); 91 83 92 CGContextSaveGState(m_bitmapContext.get()); 84 93
Note: See TracChangeset
for help on using the changeset viewer.