| 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 histogram_cache = 0; |
| 71 Platform::current()->histogramCustomCounts("Event.Latency.HitTestRecur
sive", duration, 0, 10000000, 100, &histogram_cache); |
| 72 } else { |
| 73 static Platform::HistogramCacheSlot histogram_cache = 0; |
| 74 Platform::current()->histogramCustomCounts("Event.Latency.HitTest", du
ration, 0, 10000000, 100, &histogram_cache); |
| 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 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 991 } | 997 } |
| 992 | 998 |
| 993 void LayoutView::sendMediaPositionChangeNotifications(const IntRect& visibleRect
) | 999 void LayoutView::sendMediaPositionChangeNotifications(const IntRect& visibleRect
) |
| 994 { | 1000 { |
| 995 for (auto& media : m_mediaForPositionNotification) { | 1001 for (auto& media : m_mediaForPositionNotification) { |
| 996 media->notifyPositionMayHaveChanged(visibleRect); | 1002 media->notifyPositionMayHaveChanged(visibleRect); |
| 997 } | 1003 } |
| 998 } | 1004 } |
| 999 | 1005 |
| 1000 } // namespace blink | 1006 } // namespace blink |
| OLD | NEW |