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

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

Issue 2380683006: SPv2: Add support for tracking raster paint invalidations in testing. (Closed)
Patch Set: none Created 4 years, 2 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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 if (hasLayoutObject) { 404 if (hasLayoutObject) {
405 const LayoutBoxModelObject& paintInvalidationContainer = 405 const LayoutBoxModelObject& paintInvalidationContainer =
406 m_node->layoutObject()->containerForPaintInvalidation(); 406 m_node->layoutObject()->containerForPaintInvalidation();
407 attachLinkHighlightToCompositingLayer(paintInvalidationContainer); 407 attachLinkHighlightToCompositingLayer(paintInvalidationContainer);
408 if (computeHighlightLayerPathAndPosition(paintInvalidationContainer)) { 408 if (computeHighlightLayerPathAndPosition(paintInvalidationContainer)) {
409 // We only need to invalidate the layer if the highlight size has changed, otherwise 409 // We only need to invalidate the layer if the highlight size has changed, otherwise
410 // we can just re-position the layer without needing to repaint. 410 // we can just re-position the layer without needing to repaint.
411 m_contentLayer->layer()->invalidate(); 411 m_contentLayer->layer()->invalidate();
412 412
413 if (m_currentGraphicsLayer) 413 if (m_currentGraphicsLayer)
414 m_currentGraphicsLayer->trackPaintInvalidation( 414 m_currentGraphicsLayer->trackRasterInvalidation(
415 LinkHighlightDisplayItemClientForTracking(), 415 LinkHighlightDisplayItemClientForTracking(),
416 enclosingIntRect( 416 enclosingIntRect(
417 FloatRect(layer()->position().x, layer()->position().y, 417 FloatRect(layer()->position().x, layer()->position().y,
418 layer()->bounds().width, layer()->bounds().height)), 418 layer()->bounds().width, layer()->bounds().height)),
419 PaintInvalidationFull); 419 PaintInvalidationFull);
420 } 420 }
421 } else { 421 } else {
422 clearGraphicsLayerLinkHighlightPointer(); 422 clearGraphicsLayerLinkHighlightPointer();
423 releaseResources(); 423 releaseResources();
424 } 424 }
(...skipping 11 matching lines...) Expand all
436 436
437 WebLayer* LinkHighlightImpl::layer() { 437 WebLayer* LinkHighlightImpl::layer() {
438 return clipLayer(); 438 return clipLayer();
439 } 439 }
440 440
441 CompositorAnimationPlayer* LinkHighlightImpl::compositorPlayer() const { 441 CompositorAnimationPlayer* LinkHighlightImpl::compositorPlayer() const {
442 return m_compositorPlayer.get(); 442 return m_compositorPlayer.get();
443 } 443 }
444 444
445 } // namespace blink 445 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698