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

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 2489 matching lines...) Expand 10 before | Expand all | Expand 10 after
2500 return client ? client->isTrackingPaintInvalidations() : false; 2500 return client ? client->isTrackingPaintInvalidations() : false;
2501 } 2501 }
2502 2502
2503 #if ENABLE(ASSERT) 2503 #if ENABLE(ASSERT)
2504 void CompositedLayerMapping::verifyNotPainting() 2504 void CompositedLayerMapping::verifyNotPainting()
2505 { 2505 {
2506 ASSERT(!layoutObject()->frame()->page() || !layoutObject()->frame()->page()- >isPainting()); 2506 ASSERT(!layoutObject()->frame()->page() || !layoutObject()->frame()->page()- >isPainting());
2507 } 2507 }
2508 #endif 2508 #endif
2509 2509
2510 void CompositedLayerMapping::notifyFirstPaint() 2510 void CompositedLayerMapping::notifyPaint(bool isFirstPaint, bool textPainted, bo ol imagePainted)
2511 { 2511 {
2512 if (PaintTiming* timing = m_owningLayer.paintTiming()) 2512 if (PaintTiming* timing = m_owningLayer.paintTiming())
2513 timing->markFirstPaint(); 2513 timing->notifyPaint(isFirstPaint, textPainted, imagePainted);
2514 }
2515
2516 void CompositedLayerMapping::notifyFirstTextPaint()
2517 {
2518 if (PaintTiming* timing = m_owningLayer.paintTiming())
2519 timing->markFirstTextPaint();
2520 }
2521
2522 void CompositedLayerMapping::notifyFirstImagePaint()
2523 {
2524 if (PaintTiming* timing = m_owningLayer.paintTiming())
2525 timing->markFirstImagePaint();
2526 } 2514 }
2527 2515
2528 IntRect CompositedLayerMapping::pixelSnappedCompositedBounds() const 2516 IntRect CompositedLayerMapping::pixelSnappedCompositedBounds() const
2529 { 2517 {
2530 LayoutRect bounds = m_compositedBounds; 2518 LayoutRect bounds = m_compositedBounds;
2531 bounds.move(m_owningLayer.subpixelAccumulation()); 2519 bounds.move(m_owningLayer.subpixelAccumulation());
2532 return pixelSnappedIntRect(bounds); 2520 return pixelSnappedIntRect(bounds);
2533 } 2521 }
2534 2522
2535 bool CompositedLayerMapping::invalidateLayerIfNoPrecedingEntry(size_t indexToCle ar) 2523 bool CompositedLayerMapping::invalidateLayerIfNoPrecedingEntry(size_t indexToCle ar)
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
2660 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { 2648 } else if (graphicsLayer == m_scrollingContentsLayer.get()) {
2661 name = "Scrolling Contents Layer"; 2649 name = "Scrolling Contents Layer";
2662 } else { 2650 } else {
2663 ASSERT_NOT_REACHED(); 2651 ASSERT_NOT_REACHED();
2664 } 2652 }
2665 2653
2666 return name; 2654 return name;
2667 } 2655 }
2668 2656
2669 } // namespace blink 2657 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698