Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: third_party/WebKit/Source/web/LinkHighlightImpl.cpp

Issue 1880763002: Merge repaintRects and paintInvalidationObjects in text-based-repaint test results (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698