Changeset 164406 in webkit
- Timestamp:
- Feb 19, 2014 6:03:40 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r164405 r164406 1 2014-02-19 Simon Fraser <simon.fraser@apple.com> 2 3 Avoid sending redundant layer properties to the UI process, and avoid allocation of RemoteLayerBackingStore unless we need it 4 https://bugs.webkit.org/show_bug.cgi?id=129076 5 6 Reviewed by Tim Horton. 7 8 Normally we rely on GraphicsLayerCA to avoid redundant property 9 setting on PlatformCALayers, but for contents layers GraphicsLayerCA 10 sets properties on every update. 11 12 Make PlatformCALayerRemote more efficient in this case by not 13 setting dirty flags for unchanged property sets. 14 15 Also avoid creation of RemoteLayerBackingStore unless we 16 actually need one. 17 18 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp: 19 (PlatformCALayerRemote::ensureBackingStore): 20 (PlatformCALayerRemote::updateBackingStore): 21 (PlatformCALayerRemote::setBounds): 22 (PlatformCALayerRemote::setPosition): 23 (PlatformCALayerRemote::setAnchorPoint): 24 (PlatformCALayerRemote::setMasksToBounds): 25 (PlatformCALayerRemote::setAcceleratesDrawing): 26 (PlatformCALayerRemote::setBorderWidth): 27 (PlatformCALayerRemote::setBorderColor): 28 (PlatformCALayerRemote::setContentsScale): 29 * WebProcess/WebPage/mac/PlatformCALayerRemote.h: 30 1 31 2014-02-19 Simon Fraser <simon.fraser@apple.com> 2 32 -
trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp
r164405 r164406 152 152 if (!m_properties.backingStore) 153 153 m_properties.backingStore = std::make_unique<RemoteLayerBackingStore>(); 154 155 updateBackingStore(); 156 } 157 158 void PlatformCALayerRemote::updateBackingStore() 159 { 160 if (!m_properties.backingStore) 161 return; 162 154 163 m_properties.backingStore->ensureBackingStore(this, expandedIntSize(m_properties.size), m_properties.contentsScale, m_acceleratesDrawing); 155 164 } … … 305 314 void PlatformCALayerRemote::setBounds(const FloatRect& value) 306 315 { 316 if (value.size() == m_properties.size) 317 return; 318 307 319 m_properties.size = value.size(); 308 320 m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::SizeChanged); … … 311 323 m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::CustomAppearanceChanged); 312 324 313 ensureBackingStore();325 updateBackingStore(); 314 326 } 315 327 … … 321 333 void PlatformCALayerRemote::setPosition(const FloatPoint3D& value) 322 334 { 335 if (value == m_properties.position) 336 return; 337 323 338 m_properties.position = value; 324 339 m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::PositionChanged); … … 332 347 void PlatformCALayerRemote::setAnchorPoint(const FloatPoint3D& value) 333 348 { 349 if (value == m_properties.anchorPoint) 350 return; 351 334 352 m_properties.anchorPoint = value; 335 353 m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::AnchorPointChanged); … … 388 406 void PlatformCALayerRemote::setMasksToBounds(bool value) 389 407 { 408 if (value == m_properties.masksToBounds) 409 return; 410 390 411 m_properties.masksToBounds = value; 391 412 m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::MasksToBoundsChanged); … … 400 421 { 401 422 m_acceleratesDrawing = acceleratesDrawing; 402 ensureBackingStore();423 updateBackingStore(); 403 424 } 404 425 … … 443 464 void PlatformCALayerRemote::setBorderWidth(float value) 444 465 { 466 if (value == m_properties.borderWidth) 467 return; 468 445 469 m_properties.borderWidth = value; 446 470 m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::BorderWidthChanged); … … 449 473 void PlatformCALayerRemote::setBorderColor(const Color& value) 450 474 { 475 if (value == m_properties.borderColor) 476 return; 477 451 478 m_properties.borderColor = value; 452 479 m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::BorderColorChanged); … … 510 537 m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::ContentsScaleChanged); 511 538 512 ensureBackingStore();539 updateBackingStore(); 513 540 } 514 541 -
trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h
r164405 r164406 156 156 virtual bool isPlatformCALayerRemote() const override { return true; } 157 157 void ensureBackingStore(); 158 void updateBackingStore(); 158 159 void removeSublayer(PlatformCALayerRemote*); 159 160
Note: See TracChangeset
for help on using the changeset viewer.