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

Unified Diff: cc/layers/picture_layer.cc

Issue 2876033005: Track slow paths in DisplayItemList (Closed)
Patch Set: danakj review Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/blink/web_display_item_list_impl.cc ('k') | cc/paint/display_item_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « cc/blink/web_display_item_list_impl.cc ('k') | cc/paint/display_item_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698