Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 341 bool hasLayoutObject = m_node && m_node->layoutObject(); | 341 bool hasLayoutObject = m_node && m_node->layoutObject(); |
| 342 if (hasLayoutObject) { | 342 if (hasLayoutObject) { |
| 343 const LayoutBoxModelObject& paintInvalidationContainer = m_node->layoutO bject()->containerForPaintInvalidation(); | 343 const LayoutBoxModelObject& paintInvalidationContainer = m_node->layoutO bject()->containerForPaintInvalidation(); |
| 344 attachLinkHighlightToCompositingLayer(paintInvalidationContainer); | 344 attachLinkHighlightToCompositingLayer(paintInvalidationContainer); |
| 345 if (computeHighlightLayerPathAndPosition(paintInvalidationContainer)) { | 345 if (computeHighlightLayerPathAndPosition(paintInvalidationContainer)) { |
| 346 // We only need to invalidate the layer if the highlight size has ch anged, otherwise | 346 // We only need to invalidate the layer if the highlight size has ch anged, otherwise |
| 347 // we can just re-position the layer without needing to repaint. | 347 // we can just re-position the layer without needing to repaint. |
| 348 m_contentLayer->layer()->invalidate(); | 348 m_contentLayer->layer()->invalidate(); |
| 349 | 349 |
| 350 if (m_currentGraphicsLayer && m_currentGraphicsLayer->isTrackingPain tInvalidations()) | 350 if (m_currentGraphicsLayer && m_currentGraphicsLayer->isTrackingPain tInvalidations()) |
| 351 m_currentGraphicsLayer->trackPaintInvalidationRect(FloatRect(lay er()->position().x, layer()->position().y, layer()->bounds().width, layer()->bou nds().height)); | 351 m_currentGraphicsLayer->trackPaintInvalidation("LinkHighlight", FloatRect(layer()->position().x, layer()->position().y, layer()->bounds().width, layer()->bounds().height), ""); |
|
pdr.
2016/04/12 00:20:06
These cases with empty reasons seem like bugs to m
Xianzhu
2016/04/12 01:14:26
Now use default PaintInvalidationFull. The client
| |
| 352 } | 352 } |
| 353 } else { | 353 } else { |
| 354 clearGraphicsLayerLinkHighlightPointer(); | 354 clearGraphicsLayerLinkHighlightPointer(); |
| 355 releaseResources(); | 355 releaseResources(); |
| 356 } | 356 } |
| 357 } | 357 } |
| 358 | 358 |
| 359 void LinkHighlightImpl::clearCurrentGraphicsLayer() | 359 void LinkHighlightImpl::clearCurrentGraphicsLayer() |
| 360 { | 360 { |
| 361 m_currentGraphicsLayer = 0; | 361 m_currentGraphicsLayer = 0; |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 372 { | 372 { |
| 373 return clipLayer(); | 373 return clipLayer(); |
| 374 } | 374 } |
| 375 | 375 |
| 376 CompositorAnimationPlayer* LinkHighlightImpl::compositorPlayer() const | 376 CompositorAnimationPlayer* LinkHighlightImpl::compositorPlayer() const |
| 377 { | 377 { |
| 378 return m_compositorPlayer.get(); | 378 return m_compositorPlayer.get(); |
| 379 } | 379 } |
| 380 | 380 |
| 381 } // namespace blink | 381 } // namespace blink |
| OLD | NEW |