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

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

Issue 1631143003: CL for perf tryjob on android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/layout/HitTestCache.h" 5 #include "core/layout/HitTestCache.h"
6 6
7 #include "public/platform/Platform.h" 7 #include "public/platform/Platform.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
(...skipping 10 matching lines...) Expand all
21 if (hitResult.hitTestRequest().equalForCacheability(cachedItem.h itTestRequest())) { 21 if (hitResult.hitTestRequest().equalForCacheability(cachedItem.h itTestRequest())) {
22 metric = HitHistogramMetric::HIT_EXACT_MATCH; 22 metric = HitHistogramMetric::HIT_EXACT_MATCH;
23 result = true; 23 result = true;
24 hitResult = cachedItem; 24 hitResult = cachedItem;
25 break; 25 break;
26 } 26 }
27 metric = HitHistogramMetric::MISS_VALIDITY_RECT_MATCHES; 27 metric = HitHistogramMetric::MISS_VALIDITY_RECT_MATCHES;
28 } 28 }
29 } 29 }
30 } 30 }
31 Platform::current()->histogramEnumeration("Event.HitTest", static_cast<int>( metric), static_cast<int>(HitHistogramMetric::MAX_HIT_METRIC)); 31 static Platform::HistogramCacheSlot histogram_cache = 0;
32 Platform::current()->histogramEnumeration("Event.HitTest", static_cast<int>( metric), static_cast<int>(HitHistogramMetric::MAX_HIT_METRIC), &histogram_cache) ;
32 return result; 33 return result;
33 } 34 }
34 35
35 void HitTestCache::addCachedResult(const HitTestResult& result, uint64_t domTree Version) 36 void HitTestCache::addCachedResult(const HitTestResult& result, uint64_t domTree Version)
36 { 37 {
37 if (!result.isCacheable()) 38 if (!result.isCacheable())
38 return; 39 return;
39 40
40 // If the result was a hit test on an LayoutPart and the request allowed 41 // If the result was a hit test on an LayoutPart and the request allowed
41 // querying of the layout part; then the part hasn't been loaded yet. 42 // querying of the layout part; then the part hasn't been loaded yet.
(...skipping 21 matching lines...) Expand all
63 m_updateIndex = 0; 64 m_updateIndex = 0;
64 m_items.clear(); 65 m_items.clear();
65 } 66 }
66 67
67 DEFINE_TRACE(HitTestCache) 68 DEFINE_TRACE(HitTestCache)
68 { 69 {
69 visitor->trace(m_items); 70 visitor->trace(m_items);
70 } 71 }
71 72
72 } // namespace blink 73 } // namespace blink
OLDNEW
« no previous file with comments | « content/child/blink_platform_impl.cc ('k') | third_party/WebKit/Source/core/layout/LayoutView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698