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

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

Issue 2051333005: Let FrameView track object paint invalidations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@TrackInvalidation
Patch Set: NeedsRebaseline Created 4 years, 6 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
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 360
361 bool hasLayoutObject = m_node && m_node->layoutObject(); 361 bool hasLayoutObject = m_node && m_node->layoutObject();
362 if (hasLayoutObject) { 362 if (hasLayoutObject) {
363 const LayoutBoxModelObject& paintInvalidationContainer = m_node->layoutO bject()->containerForPaintInvalidation(); 363 const LayoutBoxModelObject& paintInvalidationContainer = m_node->layoutO bject()->containerForPaintInvalidation();
364 attachLinkHighlightToCompositingLayer(paintInvalidationContainer); 364 attachLinkHighlightToCompositingLayer(paintInvalidationContainer);
365 if (computeHighlightLayerPathAndPosition(paintInvalidationContainer)) { 365 if (computeHighlightLayerPathAndPosition(paintInvalidationContainer)) {
366 // We only need to invalidate the layer if the highlight size has ch anged, otherwise 366 // We only need to invalidate the layer if the highlight size has ch anged, otherwise
367 // we can just re-position the layer without needing to repaint. 367 // we can just re-position the layer without needing to repaint.
368 m_contentLayer->layer()->invalidate(); 368 m_contentLayer->layer()->invalidate();
369 369
370 if (m_currentGraphicsLayer && m_currentGraphicsLayer->isTrackingOrCh eckingPaintInvalidations()) 370 if (m_currentGraphicsLayer)
371 m_currentGraphicsLayer->trackPaintInvalidation(LinkHighlightDisp layItemClientForTracking(), enclosingIntRect(FloatRect(layer()->position().x, la yer()->position().y, layer()->bounds().width, layer()->bounds().height)), PaintI nvalidationFull); 371 m_currentGraphicsLayer->trackPaintInvalidation(LinkHighlightDisp layItemClientForTracking(), enclosingIntRect(FloatRect(layer()->position().x, la yer()->position().y, layer()->bounds().width, layer()->bounds().height)), PaintI nvalidationFull);
372 } 372 }
373 } else { 373 } else {
374 clearGraphicsLayerLinkHighlightPointer(); 374 clearGraphicsLayerLinkHighlightPointer();
375 releaseResources(); 375 releaseResources();
376 } 376 }
377 } 377 }
378 378
379 void LinkHighlightImpl::clearCurrentGraphicsLayer() 379 void LinkHighlightImpl::clearCurrentGraphicsLayer()
380 { 380 {
(...skipping 11 matching lines...) Expand all
392 { 392 {
393 return clipLayer(); 393 return clipLayer();
394 } 394 }
395 395
396 CompositorAnimationPlayer* LinkHighlightImpl::compositorPlayer() const 396 CompositorAnimationPlayer* LinkHighlightImpl::compositorPlayer() const
397 { 397 {
398 return m_compositorPlayer.get(); 398 return m_compositorPlayer.get();
399 } 399 }
400 400
401 } // namespace blink 401 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698