Renamed some duplicate symbols in Blink paint timing code
image_paint_timing_detector.cc and text_paint_timing_detector.cc
are similar and had identically named helper functions. This
broke some jumbo builds. This patch renames the helper functions
to have unique names.
Bug: 869924
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I0a42ef4f647ea0b5bfb80bf9dc363a0650424efd
Reviewed-on: https://chromium-review.googlesource.com/c/1268135
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#597517}
diff --git a/third_party/blink/renderer/core/paint/image_paint_timing_detector.cc b/third_party/blink/renderer/core/paint/image_paint_timing_detector.cc
index 79aab46..1ad9a8fe 100644
--- a/third_party/blink/renderer/core/paint/image_paint_timing_detector.cc
+++ b/third_party/blink/renderer/core/paint/image_paint_timing_detector.cc
@@ -22,19 +22,19 @@
// capped. Exceeding such limit will deactivate the algorithm.
constexpr size_t kNodeNumberLimit = 5000;
-static bool LargeOnTop(const std::shared_ptr<ImageRecord>& a,
- const std::shared_ptr<ImageRecord>& b) {
+static bool LargeImageOnTop(const std::shared_ptr<ImageRecord>& a,
+ const std::shared_ptr<ImageRecord>& b) {
return a->first_size < b->first_size;
}
-static bool LateOnTop(const std::shared_ptr<ImageRecord>& a,
- const std::shared_ptr<ImageRecord>& b) {
+static bool LateImageOnTop(const std::shared_ptr<ImageRecord>& a,
+ const std::shared_ptr<ImageRecord>& b) {
return a->first_paint_index < b->first_paint_index;
}
ImagePaintTimingDetector::ImagePaintTimingDetector(LocalFrameView* frame_view)
- : largest_image_heap_(LargeOnTop),
- latest_image_heap_(LateOnTop),
+ : largest_image_heap_(LargeImageOnTop),
+ latest_image_heap_(LateImageOnTop),
frame_view_(frame_view) {}
void ImagePaintTimingDetector::PopulateTraceValue(
diff --git a/third_party/blink/renderer/core/paint/text_paint_timing_detector.cc b/third_party/blink/renderer/core/paint/text_paint_timing_detector.cc
index 32f12199..3278a88 100644
--- a/third_party/blink/renderer/core/paint/text_paint_timing_detector.cc
+++ b/third_party/blink/renderer/core/paint/text_paint_timing_detector.cc
@@ -21,19 +21,19 @@
// Calculate metrics candidate every 1 second after the first text pre-paint.
static constexpr TimeDelta kTimerDelay = TimeDelta::FromSeconds(1);
-static bool LargeOnTop(std::unique_ptr<TextRecord>& a,
- std::unique_ptr<TextRecord>& b) {
+static bool LargeTextOnTop(std::unique_ptr<TextRecord>& a,
+ std::unique_ptr<TextRecord>& b) {
return a->first_size < b->first_size;
}
-static bool LateOnTop(std::unique_ptr<TextRecord>& a,
- std::unique_ptr<TextRecord>& b) {
+static bool LateTextOnTop(std::unique_ptr<TextRecord>& a,
+ std::unique_ptr<TextRecord>& b) {
return a->first_paint_time < b->first_paint_time;
}
TextPaintTimingDetector::TextPaintTimingDetector(LocalFrameView* frame_view)
- : largest_text_heap_(LargeOnTop),
- latest_text_heap_(LateOnTop),
+ : largest_text_heap_(LargeTextOnTop),
+ latest_text_heap_(LateTextOnTop),
timer_(frame_view->GetFrame().GetTaskRunner(TaskType::kInternalDefault),
this,
&TextPaintTimingDetector::TimerFired),