Index: cc/layers/picture_layer.cc |
diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc |
index d2ce7ccd954a59d85fa6f7bcd7b7faf54b3c0424..f94dba2ab49f7d5e94887387ede7c2fe3a7c9cfc 100644 |
--- a/cc/layers/picture_layer.cc |
+++ b/cc/layers/picture_layer.cc |
@@ -15,6 +15,8 @@ |
#include "cc/trees/transform_node.h" |
#include "ui/gfx/geometry/rect_conversions.h" |
+static constexpr int kMaxNumberOfSlowPathsBeforeVeto = 5; |
+ |
namespace cc { |
PictureLayer::PictureLayerInputs::PictureLayerInputs() = default; |
@@ -188,7 +190,8 @@ bool PictureLayer::IsSuitableForGpuRasterization() const { |
// create a display list (e.g., if the size is empty). We return true in these |
// cases because the gpu suitability bit sticks false. |
return !picture_layer_inputs_.display_list || |
- picture_layer_inputs_.display_list->IsSuitableForGpuRasterization(); |
+ picture_layer_inputs_.display_list->NumSlowPaths() <= |
+ kMaxNumberOfSlowPathsBeforeVeto; |
} |
void PictureLayer::ClearClient() { |