Changeset 84542 in webkit
- Timestamp:
- Apr 21, 2011 1:19:36 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r84538 r84542 1 2011-04-21 Adrienne Walker <enne@google.com> 2 3 Reviewed by James Robinson. 4 5 [chromium] Don't upload partially drawn tiles in the compositor 6 https://bugs.webkit.org/show_bug.cgi?id=59112 7 8 Use the same set of tiles for painting as is used for updating. 9 Before, a larger set of tiles were being uploaded, causing some to 10 only be partially undirtied because they were not fully painted. 11 As tiles are clear their dirty rect after being unpainted, this caused 12 artifacts to appear when scrolling. 13 14 Unfortunately, no layout test can test this behavior yet because 15 scrolling invalidations are done differently in test shell. 16 17 * platform/graphics/chromium/ImageLayerChromium.cpp: 18 (WebCore::ImageLayerChromium::updateCompositorResources): 19 * platform/graphics/chromium/LayerTilerChromium.cpp: 20 (WebCore::LayerTilerChromium::update): 21 (WebCore::LayerTilerChromium::uploadCanvas): 22 (WebCore::LayerTilerChromium::updateFromPixels): 23 * platform/graphics/chromium/LayerTilerChromium.h: 24 1 25 2011-04-21 Ben Taylor <bentaylor.solx86@gmail.com> 2 26 -
trunk/Source/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp
r83915 r84542 87 87 m_dirtyRect = IntRect(); 88 88 } 89 m_tiler->updateFromPixels(paintRect, m_decodedImage.pixels());89 m_tiler->updateFromPixels(paintRect, paintRect, m_decodedImage.pixels()); 90 90 } 91 91 -
trunk/Source/WebCore/platform/graphics/chromium/LayerTilerChromium.cpp
r83915 r84542 253 253 } 254 254 255 // Due to borders, when the paint rect is extended to tile boundaries, it 256 // may end up overlapping more tiles than the original content rect. Record 257 // that original rect so we don't upload more tiles than necessary. 258 m_updateRect = contentRect; 259 260 m_paintRect = layerRectToContentRect(dirtyLayerRect); 255 261 if (dirtyLayerRect.isEmpty()) 256 262 return; 257 258 m_paintRect = layerRectToContentRect(dirtyLayerRect);259 263 260 264 m_canvas.resize(m_paintRect.size()); … … 277 281 { 278 282 TRACE_EVENT("LayerTilerChromium::updateFromPixels", this, 0); 279 updateFromPixels(m_ paintRect, locker.pixels());280 } 281 } 282 283 void LayerTilerChromium::updateFromPixels(const IntRect& paintRect, const uint8_t* paintPixels)283 updateFromPixels(m_updateRect, m_paintRect, locker.pixels()); 284 } 285 } 286 287 void LayerTilerChromium::updateFromPixels(const IntRect& contentRect, const IntRect& paintRect, const uint8_t* paintPixels) 284 288 { 285 289 // Painting could cause compositing to get turned off, which may cause the tiler to become invalidated mid-update. … … 290 294 291 295 int left, top, right, bottom; 292 contentRectToTileIndices( paintRect, left, top, right, bottom);296 contentRectToTileIndices(contentRect, left, top, right, bottom); 293 297 for (int j = top; j <= bottom; ++j) { 294 298 for (int i = left; i <= right; ++i) { -
trunk/Source/WebCore/platform/graphics/chromium/LayerTilerChromium.h
r83915 r84542 69 69 70 70 // Reserve and upload tile textures from an externally painted buffer. 71 void updateFromPixels(const IntRect& paintRect, const uint8_t* pixels);71 void updateFromPixels(const IntRect& contentRect, const IntRect& paintRect, const uint8_t* pixels); 72 72 73 73 // Draw all tiles that intersect with the content rect. … … 162 162 Vector<RefPtr<Tile> > m_unusedTiles; 163 163 164 // State held between update and uploadCanvas. 164 165 IntRect m_paintRect; 166 IntRect m_updateRect; 165 167 PlatformCanvas m_canvas; 166 168
Note: See TracChangeset
for help on using the changeset viewer.