Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 59 public: | 59 public: |
| 60 HitTestLatencyRecorder(bool allowsChildFrameContent) | 60 HitTestLatencyRecorder(bool allowsChildFrameContent) |
| 61 : m_start(WTF::monotonicallyIncreasingTime()) | 61 : m_start(WTF::monotonicallyIncreasingTime()) |
| 62 , m_allowsChildFrameContent(allowsChildFrameContent) | 62 , m_allowsChildFrameContent(allowsChildFrameContent) |
| 63 { | 63 { |
| 64 } | 64 } |
| 65 | 65 |
| 66 ~HitTestLatencyRecorder() | 66 ~HitTestLatencyRecorder() |
| 67 { | 67 { |
| 68 int duration = static_cast<int>((WTF::monotonicallyIncreasingTime() - m_ start) * 1000000); | 68 int duration = static_cast<int>((WTF::monotonicallyIncreasingTime() - m_ start) * 1000000); |
| 69 Platform::current()->histogramCustomCounts(m_allowsChildFrameContent ? " Event.Latency.HitTestRecursive" : "Event.Latency.HitTest", duration, 0, 10000000 , 100); | 69 if (m_allowsChildFrameContent) { |
| 70 static Platform::HistogramCacheSlot histogramCache = 0; | |
| 71 Platform::current()->histogramCustomCounts("Event.Latency.HitTestRec ursive", duration, 0, 10000000, 100, &histogramCache); | |
|
esprehn
2016/01/29 23:05:40
DEFINE_STATIC_LOCAL(Histogram, hitTestLatency, ("E
| |
| 72 } else { | |
| 73 static Platform::HistogramCacheSlot histogramCache = 0; | |
| 74 Platform::current()->histogramCustomCounts("Event.Latency.HitTest", duration, 0, 10000000, 100, &histogramCache); | |
| 75 } | |
| 70 } | 76 } |
| 71 | 77 |
| 72 private: | 78 private: |
| 73 double m_start; | 79 double m_start; |
| 74 bool m_allowsChildFrameContent; | 80 bool m_allowsChildFrameContent; |
| 75 }; | 81 }; |
| 76 | 82 |
| 77 } // namespace | 83 } // namespace |
| 78 | 84 |
| 79 LayoutView::LayoutView(Document* document) | 85 LayoutView::LayoutView(Document* document) |
| (...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 988 } | 994 } |
| 989 | 995 |
| 990 void LayoutView::sendMediaPositionChangeNotifications(const IntRect& visibleRect ) | 996 void LayoutView::sendMediaPositionChangeNotifications(const IntRect& visibleRect ) |
| 991 { | 997 { |
| 992 for (auto& media : m_mediaForPositionNotification) { | 998 for (auto& media : m_mediaForPositionNotification) { |
| 993 media->notifyPositionMayHaveChanged(visibleRect); | 999 media->notifyPositionMayHaveChanged(visibleRect); |
| 994 } | 1000 } |
| 995 } | 1001 } |
| 996 | 1002 |
| 997 } // namespace blink | 1003 } // namespace blink |
| OLD | NEW |