Changeset 75267 in webkit
- Timestamp:
- Jan 7, 2011 1:19:58 PM (13 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r75253 r75267 1 2011-01-06 Adam Roben <aroben@apple.com> 2 3 Fill the WKView with white when the web process hasn't drawn anything 4 yet 5 6 Fixes <http://webkit.org/b/52023> WKView accumulates pixel garbage 7 before web process has had a chance to draw anything (if Aero is 8 disabled) 9 10 Reviewed by Jon Honeycutt. 11 12 * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp: 13 (WebKit::ChunkedUpdateDrawingAreaProxy::paint): 14 * UIProcess/ChunkedUpdateDrawingAreaProxy.h: 15 * UIProcess/DrawingAreaProxy.h: 16 * UIProcess/LayerBackedDrawingAreaProxy.cpp: 17 (WebKit::LayerBackedDrawingAreaProxy::paint): 18 * UIProcess/LayerBackedDrawingAreaProxy.h: 19 * UIProcess/TiledDrawingAreaProxy.cpp: 20 (WebKit::TiledDrawingAreaProxy::paint): 21 * UIProcess/TiledDrawingAreaProxy.h: 22 * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm: 23 (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint): 24 * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp: 25 (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint): 26 * UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp: 27 (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint): 28 * UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp: 29 (WebKit::LayerBackedDrawingAreaProxy::paint): 30 Changed these functions to return a boolean indicating whether we 31 actually painted anything. 32 33 * UIProcess/win/WebView.cpp: 34 (WebKit::WebView::onPaintEvent): Fill with white (and don't call 35 didDraw) when the DrawingAreaProxy isn't able to paint. 36 1 37 2011-01-06 Jessie Berlin <jberlin@apple.com> 2 38 -
trunk/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.cpp
r74669 r75267 56 56 } 57 57 58 voidChunkedUpdateDrawingAreaProxy::paint(const IntRect& rect, PlatformDrawingContext context)58 bool ChunkedUpdateDrawingAreaProxy::paint(const IntRect& rect, PlatformDrawingContext context) 59 59 { 60 60 if (m_isWaitingForDidSetFrameNotification) { 61 61 WebPageProxy* page = this->page(); 62 62 if (!page->isValid()) 63 return ;63 return false; 64 64 65 65 if (page->process()->isLaunching()) 66 return ;66 return false; 67 67 68 68 OwnPtr<CoreIPC::ArgumentDecoder> arguments = page->process()->connection()->waitFor(DrawingAreaProxyLegacyMessage::DidSetSize, page->pageID(), 0.04); … … 71 71 } 72 72 73 platformPaint(rect, context);73 return platformPaint(rect, context); 74 74 } 75 75 -
trunk/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.h
r74300 r75267 69 69 // DrawingAreaProxy 70 70 virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 71 virtual voidpaint(const WebCore::IntRect&, PlatformDrawingContext);71 virtual bool paint(const WebCore::IntRect&, PlatformDrawingContext); 72 72 virtual void sizeDidChange(); 73 73 virtual void setPageIsVisible(bool isVisible); … … 75 75 void ensureBackingStore(); 76 76 void invalidateBackingStore(); 77 voidplatformPaint(const WebCore::IntRect&, PlatformDrawingContext);77 bool platformPaint(const WebCore::IntRect&, PlatformDrawingContext); 78 78 void drawUpdateChunkIntoBackingStore(UpdateChunk*); 79 79 void didSetSize(UpdateChunk*); -
trunk/WebKit2/UIProcess/DrawingAreaProxy.h
r74668 r75267 57 57 virtual void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*) { ASSERT_NOT_REACHED(); } 58 58 59 virtual void paint(const WebCore::IntRect&, PlatformDrawingContext) = 0; 59 // Returns true if painting was successful, false otherwise. 60 virtual bool paint(const WebCore::IntRect&, PlatformDrawingContext) = 0; 61 60 62 virtual void sizeDidChange() = 0; 61 63 virtual void setPageIsVisible(bool isVisible) = 0; -
trunk/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp
r74669 r75267 57 57 58 58 #if !PLATFORM(WIN) 59 voidLayerBackedDrawingAreaProxy::paint(const IntRect& rect, PlatformDrawingContext context)59 bool LayerBackedDrawingAreaProxy::paint(const IntRect& rect, PlatformDrawingContext context) 60 60 { 61 return true; 61 62 } 62 63 #endif -
trunk/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.h
r74294 r75267 68 68 virtual void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*); 69 69 70 virtual voidpaint(const WebCore::IntRect&, PlatformDrawingContext);70 virtual bool paint(const WebCore::IntRect&, PlatformDrawingContext); 71 71 virtual void sizeDidChange(); 72 72 virtual void setPageIsVisible(bool isVisible); -
trunk/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp
r74669 r75267 316 316 } 317 317 318 voidTiledDrawingAreaProxy::paint(const IntRect& rect, PlatformDrawingContext context)318 bool TiledDrawingAreaProxy::paint(const IntRect& rect, PlatformDrawingContext context) 319 319 { 320 320 if (m_isWaitingForDidSetFrameNotification) { 321 321 WebPageProxy* page = this->page(); 322 322 if (!page->isValid()) 323 return ;323 return false; 324 324 325 325 if (page->process()->isLaunching()) 326 return ;326 return false; 327 327 } 328 328 … … 349 349 } 350 350 } 351 351 352 gc.restore(); 353 return true; 352 354 } 353 355 -
trunk/WebKit2/UIProcess/TiledDrawingAreaProxy.h
r74294 r75267 116 116 virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 117 117 virtual void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder&); 118 virtual voidpaint(const WebCore::IntRect&, PlatformDrawingContext);118 virtual bool paint(const WebCore::IntRect&, PlatformDrawingContext); 119 119 virtual void sizeDidChange(); 120 120 virtual void setPageIsVisible(bool isVisible); -
trunk/WebKit2/UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm
r73666 r75267 61 61 } 62 62 63 voidChunkedUpdateDrawingAreaProxy::platformPaint(const IntRect& rect, CGContextRef context)63 bool ChunkedUpdateDrawingAreaProxy::platformPaint(const IntRect& rect, CGContextRef context) 64 64 { 65 65 if (!m_bitmapContext) 66 return ;66 return false; 67 67 68 68 CGContextSaveGState(context); … … 80 80 81 81 CGContextRestoreGState(context); 82 return true; 82 83 } 83 84 -
trunk/WebKit2/UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp
r71780 r75267 57 57 } 58 58 59 voidChunkedUpdateDrawingAreaProxy::platformPaint(const IntRect& rect, QPainter* painter)59 bool ChunkedUpdateDrawingAreaProxy::platformPaint(const IntRect& rect, QPainter* painter) 60 60 { 61 61 if (m_backingStoreImage.isNull()) 62 return ;62 return false; 63 63 64 64 painter->drawImage(QPoint(0, 0), m_backingStoreImage); 65 return true; 65 66 } 66 67 -
trunk/WebKit2/UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp
r71780 r75267 65 65 } 66 66 67 voidChunkedUpdateDrawingAreaProxy::platformPaint(const IntRect& rect, HDC hdc)67 bool ChunkedUpdateDrawingAreaProxy::platformPaint(const IntRect& rect, HDC hdc) 68 68 { 69 69 if (!m_backingStoreBitmap) 70 return ;70 return false; 71 71 72 72 // BitBlt from the backing-store to the passed in hdc. 73 73 ::BitBlt(hdc, rect.x(), rect.y(), rect.width(), rect.height(), m_backingStoreDC.get(), rect.x(), rect.y(), SRCCOPY); 74 return true; 74 75 } 75 76 -
trunk/WebKit2/UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp
r72212 r75267 56 56 } 57 57 58 voidLayerBackedDrawingAreaProxy::paint(const IntRect&, PlatformDrawingContext)58 bool LayerBackedDrawingAreaProxy::paint(const IntRect&, PlatformDrawingContext) 59 59 { 60 return false; 60 61 } 61 62 -
trunk/WebKit2/UIProcess/win/WebView.cpp
r75187 r75267 388 388 HDC hdc = ::BeginPaint(m_window, &paintStruct); 389 389 390 if (m_page->isValid() && m_page->drawingArea()) { 391 m_page->drawingArea()->paint(IntRect(paintStruct.rcPaint), hdc); 390 if (m_page->isValid() && m_page->drawingArea() && m_page->drawingArea()->paint(IntRect(paintStruct.rcPaint), hdc)) 392 391 m_page->didDraw(); 393 }else {392 else { 394 393 // Mac checks WebPageProxy::drawsBackground and 395 394 // WebPageProxy::drawsTransparentBackground here, but those are always false on Windows
Note: See TracChangeset
for help on using the changeset viewer.