| 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 0b017b04664f39301d876849fb16377bc756bc75..aa0b0378feb0fd04b0e561c378f6e5d6b7cb978f 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
|
| @@ -163,6 +163,7 @@ void PaintController::AddCachedSubsequence(const DisplayItemClient& client,
|
| new_cached_subsequences_.end());
|
|
|
| new_cached_subsequences_.insert(&client, SubsequenceMarkers(start, end));
|
| + last_cached_subsequence_end_ = end;
|
| }
|
|
|
| bool PaintController::LastDisplayItemIsNoopBegin() const {
|
| @@ -173,6 +174,11 @@ bool PaintController::LastDisplayItemIsNoopBegin() const {
|
| return last_display_item.IsBegin() && !last_display_item.DrawsContent();
|
| }
|
|
|
| +bool PaintController::LastDisplayItemIsSubsequenceEnd() const {
|
| + return !new_cached_subsequences_.IsEmpty() &&
|
| + last_cached_subsequence_end_ == new_display_item_list_.size() - 1;
|
| +}
|
| +
|
| void PaintController::RemoveLastDisplayItem() {
|
| if (new_display_item_list_.IsEmpty())
|
| return;
|
| @@ -536,6 +542,7 @@ void PaintController::CommitNewDisplayItems(
|
|
|
| new_cached_subsequences_.Swap(current_cached_subsequences_);
|
| new_cached_subsequences_.Clear();
|
| + last_cached_subsequence_end_ = 0;
|
| for (auto& item : current_cached_subsequences_) {
|
| item.key->SetDisplayItemsCached(current_cache_generation_);
|
| #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS
|
|
|