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

Side by Side Diff: Source/core/rendering/compositing/CompositedLayerMapping.cpp

Issue 565793003: [Invalidation Tracking] Add trace events for compositor based invalidations (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: use cmacro Created 6 years, 3 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) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 Apple 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 // offset to be. 601 // offset to be.
602 for (size_t i = 0; i < layers.size(); ++i) { 602 for (size_t i = 0; i < layers.size(); ++i) {
603 LayoutPoint offsetFromTransformedAncestorForSquashedLayer = layers[i].re nderLayer->computeOffsetFromTransformedAncestor(); 603 LayoutPoint offsetFromTransformedAncestorForSquashedLayer = layers[i].re nderLayer->computeOffsetFromTransformedAncestor();
604 LayoutSize offsetFromSquashLayerOrigin = (offsetFromTransformedAncestorF orSquashedLayer - referenceOffsetFromTransformedAncestor) - squashLayerOriginInO wningLayerSpace; 604 LayoutSize offsetFromSquashLayerOrigin = (offsetFromTransformedAncestorF orSquashedLayer - referenceOffsetFromTransformedAncestor) - squashLayerOriginInO wningLayerSpace;
605 605
606 // It is ok to issue paint invalidation here, because all of the geometr y needed to correctly invalidate paint is computed by this point. 606 // It is ok to issue paint invalidation here, because all of the geometr y needed to correctly invalidate paint is computed by this point.
607 IntSize newOffsetFromRenderer = -IntSize(offsetFromSquashLayerOrigin.wid th().round(), offsetFromSquashLayerOrigin.height().round()); 607 IntSize newOffsetFromRenderer = -IntSize(offsetFromSquashLayerOrigin.wid th().round(), offsetFromSquashLayerOrigin.height().round());
608 LayoutSize subpixelAccumulation = offsetFromSquashLayerOrigin + newOffse tFromRenderer; 608 LayoutSize subpixelAccumulation = offsetFromSquashLayerOrigin + newOffse tFromRenderer;
609 if (layers[i].offsetFromRendererSet && layers[i].offsetFromRenderer != n ewOffsetFromRenderer) { 609 if (layers[i].offsetFromRendererSet && layers[i].offsetFromRenderer != n ewOffsetFromRenderer) {
610 layers[i].renderLayer->paintInvalidator().paintInvalidationIncluding NonCompositingDescendants(); 610 layers[i].renderLayer->paintInvalidator().paintInvalidationIncluding NonCompositingDescendants();
611
612 TRACE_LAYER_INVALIDATION(layers[i].renderLayer, InspectorLayerInvali dationTrackingEvent::SquashingLayerGeometryWasUpdated);
611 layersNeedingPaintInvalidation.append(layers[i].renderLayer); 613 layersNeedingPaintInvalidation.append(layers[i].renderLayer);
612 } 614 }
613 layers[i].offsetFromRenderer = newOffsetFromRenderer; 615 layers[i].offsetFromRenderer = newOffsetFromRenderer;
614 layers[i].offsetFromRendererSet = true; 616 layers[i].offsetFromRendererSet = true;
615 617
616 layers[i].renderLayer->setSubpixelAccumulation(subpixelAccumulation); 618 layers[i].renderLayer->setSubpixelAccumulation(subpixelAccumulation);
617 } 619 }
618 620
619 squashingLayer->setPosition(squashLayerBounds.location()); 621 squashingLayer->setPosition(squashLayerBounds.location());
620 squashingLayer->setSize(squashLayerBounds.size()); 622 squashingLayer->setSize(squashLayerBounds.size());
(...skipping 1730 matching lines...) Expand 10 before | Expand all | Expand 10 after
2351 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { 2353 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) {
2352 name = "Scrolling Block Selection Layer"; 2354 name = "Scrolling Block Selection Layer";
2353 } else { 2355 } else {
2354 ASSERT_NOT_REACHED(); 2356 ASSERT_NOT_REACHED();
2355 } 2357 }
2356 2358
2357 return name; 2359 return name;
2358 } 2360 }
2359 2361
2360 } // namespace blink 2362 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorTraceEvents.cpp ('k') | Source/core/rendering/compositing/CompositingLayerAssigner.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698