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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.cpp

Issue 2876033005: Track slow paths in DisplayItemList (Closed)
Patch Set: Rebase 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
Index: third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.cpp
index ec6345e49310ecb348b6f597d87528b18534af19..5137c507cbbb53f40cb8e4cfd47ef1e9407580b6 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.cpp
@@ -46,32 +46,28 @@ void ComputeChunkBoundsAndOpaqueness(const DisplayItemList& display_items,
} // namespace
-PaintArtifact::PaintArtifact()
- : display_item_list_(0), is_suitable_for_gpu_rasterization_(true) {}
+PaintArtifact::PaintArtifact() : display_item_list_(0) {}
PaintArtifact::PaintArtifact(DisplayItemList display_items,
Vector<PaintChunk> paint_chunks,
- bool is_suitable_for_gpu_rasterization_arg)
+ int num_slow_paths)
: display_item_list_(std::move(display_items)),
paint_chunks_(std::move(paint_chunks)),
- is_suitable_for_gpu_rasterization_(
- is_suitable_for_gpu_rasterization_arg) {
+ num_slow_paths_(num_slow_paths) {
ComputeChunkBoundsAndOpaqueness(display_item_list_, paint_chunks_);
}
PaintArtifact::PaintArtifact(PaintArtifact&& source)
: display_item_list_(std::move(source.display_item_list_)),
paint_chunks_(std::move(source.paint_chunks_)),
- is_suitable_for_gpu_rasterization_(
- source.is_suitable_for_gpu_rasterization_) {}
+ num_slow_paths_(source.num_slow_paths_) {}
PaintArtifact::~PaintArtifact() {}
PaintArtifact& PaintArtifact::operator=(PaintArtifact&& source) {
display_item_list_ = std::move(source.display_item_list_);
paint_chunks_ = std::move(source.paint_chunks_);
- is_suitable_for_gpu_rasterization_ =
- source.is_suitable_for_gpu_rasterization_;
+ num_slow_paths_ = source.num_slow_paths_;
return *this;
}
@@ -123,7 +119,7 @@ void PaintArtifact::AppendToWebDisplayItemList(WebDisplayItemList* list) const {
display_item_list_.VisualRect(visual_rect_index), list);
visual_rect_index++;
}
- list->SetIsSuitableForGpuRasterization(IsSuitableForGpuRasterization());
+ list->SetNumSlowPaths(num_slow_paths_);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698