Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 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 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 591 return !it->value.trackedPaintInvalidations.isEmpty(); | 591 return !it->value.trackedPaintInvalidations.isEmpty(); |
| 592 return false; | 592 return false; |
| 593 } | 593 } |
| 594 | 594 |
| 595 void GraphicsLayer::trackPaintInvalidation(const DisplayItemClient& client, cons t IntRect& rect, PaintInvalidationReason reason) | 595 void GraphicsLayer::trackPaintInvalidation(const DisplayItemClient& client, cons t IntRect& rect, PaintInvalidationReason reason) |
| 596 { | 596 { |
| 597 if (!isTrackingOrCheckingPaintInvalidations() || rect.isEmpty()) | 597 if (!isTrackingOrCheckingPaintInvalidations() || rect.isEmpty()) |
| 598 return; | 598 return; |
| 599 | 599 |
| 600 PaintInvalidationTracking& tracking = paintInvalidationTrackingMap().add(thi s, PaintInvalidationTracking()).storedValue->value; | 600 PaintInvalidationTracking& tracking = paintInvalidationTrackingMap().add(thi s, PaintInvalidationTracking()).storedValue->value; |
| 601 PaintInvalidationInfo info = { &client, client.debugName(), rect, reason }; | 601 |
| 602 tracking.trackedPaintInvalidations.append(info); | 602 if (m_isTrackingPaintInvalidations) { |
|
chrishtr
2016/06/24 17:15:15
Why is this conditional newly needed? Was it an ov
| |
| 603 PaintInvalidationInfo info = { &client, client.debugName(), rect, reason }; | |
| 604 tracking.trackedPaintInvalidations.append(info); | |
| 605 } | |
| 603 | 606 |
| 604 #if DCHECK_IS_ON() | 607 #if DCHECK_IS_ON() |
| 605 if (RuntimeEnabledFeatures::slimmingPaintUnderInvalidationCheckingEnabled()) { | 608 if (RuntimeEnabledFeatures::slimmingPaintUnderInvalidationCheckingEnabled()) { |
| 606 // TODO(crbug.com/496260): Some antialiasing effects overflows the paint invalidation rect. | 609 // TODO(crbug.com/496260): Some antialiasing effects overflows the paint invalidation rect. |
| 607 IntRect r = rect; | 610 IntRect r = rect; |
| 608 r.inflate(1); | 611 r.inflate(1); |
| 609 tracking.paintInvalidationRegionSinceLastPaint.unite(r); | 612 tracking.paintInvalidationRegionSinceLastPaint.unite(r); |
| 610 } | 613 } |
| 611 #endif | 614 #endif |
| 612 } | 615 } |
| (...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1371 { | 1374 { |
| 1372 if (!layer) { | 1375 if (!layer) { |
| 1373 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); | 1376 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); |
| 1374 return; | 1377 return; |
| 1375 } | 1378 } |
| 1376 | 1379 |
| 1377 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1380 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
| 1378 fprintf(stderr, "%s\n", output.utf8().data()); | 1381 fprintf(stderr, "%s\n", output.utf8().data()); |
| 1379 } | 1382 } |
| 1380 #endif | 1383 #endif |
| OLD | NEW |