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

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 2039363003: FirstMeaningfulPaint UMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wait in renderer Created 4 years, 4 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 2501 matching lines...) Expand 10 before | Expand all | Expand 10 after
2512 return client ? client->isTrackingPaintInvalidations() : false; 2512 return client ? client->isTrackingPaintInvalidations() : false;
2513 } 2513 }
2514 2514
2515 #if ENABLE(ASSERT) 2515 #if ENABLE(ASSERT)
2516 void CompositedLayerMapping::verifyNotPainting() 2516 void CompositedLayerMapping::verifyNotPainting()
2517 { 2517 {
2518 ASSERT(!layoutObject()->frame()->page() || !layoutObject()->frame()->page()- >isPainting()); 2518 ASSERT(!layoutObject()->frame()->page() || !layoutObject()->frame()->page()- >isPainting());
2519 } 2519 }
2520 #endif 2520 #endif
2521 2521
2522 void CompositedLayerMapping::notifyFirstPaint() 2522 void CompositedLayerMapping::notifyPaint(bool isFirstPaint, bool textPainted, bo ol imagePainted)
2523 { 2523 {
2524 if (PaintTiming* timing = m_owningLayer.paintTiming()) 2524 if (PaintTiming* timing = m_owningLayer.paintTiming())
2525 timing->markFirstPaint(); 2525 timing->notifyPaint(isFirstPaint, textPainted, imagePainted);
2526 }
2527
2528 void CompositedLayerMapping::notifyFirstTextPaint()
2529 {
2530 if (PaintTiming* timing = m_owningLayer.paintTiming())
2531 timing->markFirstTextPaint();
2532 }
2533
2534 void CompositedLayerMapping::notifyFirstImagePaint()
2535 {
2536 if (PaintTiming* timing = m_owningLayer.paintTiming())
2537 timing->markFirstImagePaint();
2538 } 2526 }
2539 2527
2540 IntRect CompositedLayerMapping::pixelSnappedCompositedBounds() const 2528 IntRect CompositedLayerMapping::pixelSnappedCompositedBounds() const
2541 { 2529 {
2542 LayoutRect bounds = m_compositedBounds; 2530 LayoutRect bounds = m_compositedBounds;
2543 bounds.move(m_owningLayer.subpixelAccumulation()); 2531 bounds.move(m_owningLayer.subpixelAccumulation());
2544 return pixelSnappedIntRect(bounds); 2532 return pixelSnappedIntRect(bounds);
2545 } 2533 }
2546 2534
2547 bool CompositedLayerMapping::invalidateLayerIfNoPrecedingEntry(size_t indexToCle ar) 2535 bool CompositedLayerMapping::invalidateLayerIfNoPrecedingEntry(size_t indexToCle ar)
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
2672 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { 2660 } else if (graphicsLayer == m_scrollingContentsLayer.get()) {
2673 name = "Scrolling Contents Layer"; 2661 name = "Scrolling Contents Layer";
2674 } else { 2662 } else {
2675 ASSERT_NOT_REACHED(); 2663 ASSERT_NOT_REACHED();
2676 } 2664 }
2677 2665
2678 return name; 2666 return name;
2679 } 2667 }
2680 2668
2681 } // namespace blink 2669 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698