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

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: rebase 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 2525 matching lines...) Expand 10 before | Expand all | Expand 10 after
2536 return client ? client->isTrackingPaintInvalidations() : false; 2536 return client ? client->isTrackingPaintInvalidations() : false;
2537 } 2537 }
2538 2538
2539 #if ENABLE(ASSERT) 2539 #if ENABLE(ASSERT)
2540 void CompositedLayerMapping::verifyNotPainting() 2540 void CompositedLayerMapping::verifyNotPainting()
2541 { 2541 {
2542 ASSERT(!layoutObject()->frame()->page() || !layoutObject()->frame()->page()- >isPainting()); 2542 ASSERT(!layoutObject()->frame()->page() || !layoutObject()->frame()->page()- >isPainting());
2543 } 2543 }
2544 #endif 2544 #endif
2545 2545
2546 void CompositedLayerMapping::notifyFirstPaint() 2546 void CompositedLayerMapping::notifyPaint(bool isFirstPaint, bool textPainted, bo ol imagePainted)
2547 { 2547 {
2548 if (PaintTiming* timing = m_owningLayer.paintTiming()) 2548 if (PaintTiming* timing = m_owningLayer.paintTiming())
2549 timing->markFirstPaint(); 2549 timing->notifyPaint(isFirstPaint, textPainted, imagePainted);
2550 }
2551
2552 void CompositedLayerMapping::notifyFirstTextPaint()
2553 {
2554 if (PaintTiming* timing = m_owningLayer.paintTiming())
2555 timing->markFirstTextPaint();
2556 }
2557
2558 void CompositedLayerMapping::notifyFirstImagePaint()
2559 {
2560 if (PaintTiming* timing = m_owningLayer.paintTiming())
2561 timing->markFirstImagePaint();
2562 } 2550 }
2563 2551
2564 IntRect CompositedLayerMapping::pixelSnappedCompositedBounds() const 2552 IntRect CompositedLayerMapping::pixelSnappedCompositedBounds() const
2565 { 2553 {
2566 LayoutRect bounds = m_compositedBounds; 2554 LayoutRect bounds = m_compositedBounds;
2567 bounds.move(m_owningLayer.subpixelAccumulation()); 2555 bounds.move(m_owningLayer.subpixelAccumulation());
2568 return pixelSnappedIntRect(bounds); 2556 return pixelSnappedIntRect(bounds);
2569 } 2557 }
2570 2558
2571 bool CompositedLayerMapping::invalidateLayerIfNoPrecedingEntry(size_t indexToCle ar) 2559 bool CompositedLayerMapping::invalidateLayerIfNoPrecedingEntry(size_t indexToCle ar)
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
2709 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { 2697 } else if (graphicsLayer == m_scrollingContentsLayer.get()) {
2710 name = "Scrolling Contents Layer"; 2698 name = "Scrolling Contents Layer";
2711 } else { 2699 } else {
2712 ASSERT_NOT_REACHED(); 2700 ASSERT_NOT_REACHED();
2713 } 2701 }
2714 2702
2715 return name; 2703 return name;
2716 } 2704 }
2717 2705
2718 } // namespace blink 2706 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698