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

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

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
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 96d45d912247d4a489f746ae5f74524596d26a55..c53a383c3f4f19e5aa81c379060d49fb19ae910a 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.cpp
@@ -46,38 +46,35 @@ 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;
}
void PaintArtifact::Reset() {
display_item_list_.Clear();
paint_chunks_.clear();
+ num_slow_paths_ = 0;
}
size_t PaintArtifact::ApproximateUnsharedMemoryUsage() const {
@@ -121,7 +118,7 @@ void PaintArtifact::AppendToWebDisplayItemList(
TRACE_EVENT0("blink,benchmark", "PaintArtifact::appendToWebDisplayItemList");
for (const DisplayItem& item : display_item_list_)
item.AppendToWebDisplayItemList(visual_rect_offset, list);
- list->SetIsSuitableForGpuRasterization(IsSuitableForGpuRasterization());
+ list->SetNumSlowPaths(num_slow_paths_);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698