Changeset 109424 in webkit
- Timestamp:
- Mar 1, 2012 2:24:52 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r109417 r109424 1 2012-03-01 James Robinson <jamesr@chromium.org> 2 3 [chromium] Move pageScaleDirty logic from LayerChromium to GraphicsLayerChromium 4 https://bugs.webkit.org/show_bug.cgi?id=79714 5 6 Reviewed by Adrienne Walker. 7 8 When the page scale changes on a composited layer we need to invalidate all of the contents on the layer in 9 order to repaint them at the new scale. The sequence of calls we get make this a bit tricky, since we first 10 receive a page scale changed notification and then receive the new layer bounds. The solution is to defer the 11 invalidation until we have the new layer bounds, which landed in r99774. 12 13 This moves that logic from LayerChromium into GraphicsLayerChromium since IMO this is pretty particular to the 14 way WebCore is passing us invalidations and not something fundamental to the compositor. 15 16 * platform/graphics/chromium/GraphicsLayerChromium.cpp: 17 (WebCore::GraphicsLayerChromium::GraphicsLayerChromium): 18 (WebCore::GraphicsLayerChromium::setSize): 19 (WebCore::GraphicsLayerChromium::deviceOrPageScaleFactorChanged): 20 * platform/graphics/chromium/GraphicsLayerChromium.h: 21 * platform/graphics/chromium/LayerChromium.cpp: 22 (WebCore::LayerChromium::LayerChromium): 23 (WebCore::LayerChromium::setBounds): 24 * platform/graphics/chromium/LayerChromium.h: 25 (LayerChromium): 26 1 27 2012-03-01 Joe Thomas <joethomas@motorola.com> 2 28 -
trunk/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp
r108880 r109424 79 79 , m_contentsLayerHasBackgroundColor(false) 80 80 , m_inSetChildren(false) 81 , m_pageScaleChanged(false) 81 82 { 82 83 m_layer = ContentLayerChromium::create(this); … … 202 203 GraphicsLayer::setSize(clampedSize); 203 204 updateLayerSize(); 205 206 if (m_pageScaleChanged && m_layer) 207 m_layer->setNeedsDisplay(); 208 m_pageScaleChanged = false; 204 209 } 205 210 … … 723 728 { 724 729 updateContentsScale(); 725 if (m_layer) 726 m_layer->pageScaleChanged(); 730 // Invalidations are clamped to the layer's bounds but we receive the scale changed notification before receiving 731 // the new layer bounds. When the scale changes, we really want to invalidate the post-scale layer bounds, so we 732 // remember that the scale has changed and then invalidate the full layer bounds when we receive the new size. 733 m_pageScaleChanged = true; 727 734 } 728 735 -
trunk/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.h
r108880 r109424 166 166 bool m_contentsLayerHasBackgroundColor : 1; 167 167 bool m_inSetChildren; 168 bool m_pageScaleChanged; 168 169 169 170 AnimationIdMap m_animationIdMap; -
trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp
r108937 r109424 85 85 , m_targetRenderSurface(0) 86 86 , m_contentsScale(1.0) 87 , m_pageScaleDirty(false)88 87 , m_layerAnimationDelegate(0) 89 88 { … … 279 278 m_bounds = size; 280 279 281 if (firstResize || m_pageScaleDirty)280 if (firstResize) 282 281 setNeedsDisplay(); 283 282 else 284 283 setNeedsCommit(); 285 286 m_pageScaleDirty = false;287 284 } 288 285 -
trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h
r108937 r109424 170 170 virtual void unreserveContentsTexture() { } 171 171 virtual void bindContentsTexture() { } 172 virtual void pageScaleChanged() { m_pageScaleDirty = true; }173 172 virtual void protectVisibleTileTextures() { } 174 173 virtual bool needsContentsScale() const { return false; } … … 327 326 String m_name; 328 327 329 bool m_pageScaleDirty;330 331 328 CCLayerAnimationDelegate* m_layerAnimationDelegate; 332 329 };
Note: See TracChangeset
for help on using the changeset viewer.