| Index: third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
|
| index 9e74558a4400cc35a12b0f36b1d611b2eda65ae0..fc8ebc1a45669896ee37d63f48fe095432d8bb70 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
|
| @@ -15,8 +15,6 @@
|
| #include "platform/graphics/LoggingCanvas.h"
|
| #include <stdio.h>
|
| #endif
|
| -
|
| -static constexpr int kMaxNumberOfSlowPathsBeforeVeto = 5;
|
|
|
| namespace blink {
|
|
|
| @@ -538,7 +536,7 @@
|
| !new_display_item_list_.IsEmpty())
|
| GenerateChunkRasterInvalidationRects(new_paint_chunks_.LastChunk());
|
|
|
| - int num_slow_paths = 0;
|
| + SkPictureGpuAnalyzer gpu_analyzer;
|
|
|
| current_cache_generation_ =
|
| DisplayItemClient::CacheGenerationOrInvalidationReason::Next();
|
| @@ -557,8 +555,8 @@
|
| Vector<const DisplayItemClient*> skipped_cache_clients;
|
| for (const auto& item : new_display_item_list_) {
|
| // No reason to continue the analysis once we have a veto.
|
| - if (num_slow_paths <= kMaxNumberOfSlowPathsBeforeVeto)
|
| - num_slow_paths += item.NumberOfSlowPaths();
|
| + if (gpu_analyzer.suitableForGpuRasterization())
|
| + item.AnalyzeForGpuRasterization(gpu_analyzer);
|
|
|
| // TODO(wkorman): Only compute and append visual rect for drawings.
|
| new_display_item_list_.AppendVisualRect(
|
| @@ -596,7 +594,7 @@
|
| new_display_item_list_.ShrinkToFit();
|
| current_paint_artifact_ = PaintArtifact(
|
| std::move(new_display_item_list_), new_paint_chunks_.ReleasePaintChunks(),
|
| - num_slow_paths <= kMaxNumberOfSlowPathsBeforeVeto);
|
| + gpu_analyzer.suitableForGpuRasterization());
|
| ResetCurrentListIndices();
|
| out_of_order_item_indices_.clear();
|
| out_of_order_chunk_indices_.clear();
|
|
|