| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/graphics/paint/PaintController.h" | 5 #include "platform/graphics/paint/PaintController.h" |
| 6 | 6 |
| 7 #include "platform/graphics/GraphicsLayer.h" | 7 #include "platform/graphics/GraphicsLayer.h" |
| 8 #include "platform/graphics/paint/DrawingDisplayItem.h" | 8 #include "platform/graphics/paint/DrawingDisplayItem.h" |
| 9 #include "platform/instrumentation/tracing/TraceEvent.h" | 9 #include "platform/instrumentation/tracing/TraceEvent.h" |
| 10 #include "platform/wtf/AutoReset.h" | 10 #include "platform/wtf/AutoReset.h" |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 | 533 |
| 534 current_cache_generation_ = | 534 current_cache_generation_ = |
| 535 DisplayItemClient::CacheGenerationOrInvalidationReason::Next(); | 535 DisplayItemClient::CacheGenerationOrInvalidationReason::Next(); |
| 536 | 536 |
| 537 new_cached_subsequences_.Swap(current_cached_subsequences_); | 537 new_cached_subsequences_.Swap(current_cached_subsequences_); |
| 538 new_cached_subsequences_.Clear(); | 538 new_cached_subsequences_.Clear(); |
| 539 for (auto& item : current_cached_subsequences_) { | 539 for (auto& item : current_cached_subsequences_) { |
| 540 item.key->SetDisplayItemsCached(current_cache_generation_); | 540 item.key->SetDisplayItemsCached(current_cache_generation_); |
| 541 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS | 541 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS |
| 542 DisplayItemClient::EndShouldKeepAliveAllClients(item.key); | 542 DisplayItemClient::EndShouldKeepAliveAllClients(item.key); |
| 543 DCHECK(current_subsequence_clients_.IsEmpty()); |
| 543 #endif | 544 #endif |
| 544 } | 545 } |
| 545 | 546 |
| 546 Vector<const DisplayItemClient*> skipped_cache_clients; | 547 Vector<const DisplayItemClient*> skipped_cache_clients; |
| 547 for (const auto& item : new_display_item_list_) { | 548 for (const auto& item : new_display_item_list_) { |
| 548 // No reason to continue the analysis once we have a veto. | 549 // No reason to continue the analysis once we have a veto. |
| 549 if (gpu_analyzer.suitableForGpuRasterization()) | 550 if (gpu_analyzer.suitableForGpuRasterization()) |
| 550 item.AnalyzeForGpuRasterization(gpu_analyzer); | 551 item.AnalyzeForGpuRasterization(gpu_analyzer); |
| 551 | 552 |
| 552 // TODO(wkorman): Only compute and append visual rect for drawings. | 553 // TODO(wkorman): Only compute and append visual rect for drawings. |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 924 show_paint_records | 925 show_paint_records |
| 925 ? (DisplayItemList::JsonOptions::kShowPaintRecords | | 926 ? (DisplayItemList::JsonOptions::kShowPaintRecords | |
| 926 DisplayItemList::JsonOptions::kShowClientDebugName) | 927 DisplayItemList::JsonOptions::kShowClientDebugName) |
| 927 : DisplayItemList::JsonOptions::kShowClientDebugName) | 928 : DisplayItemList::JsonOptions::kShowClientDebugName) |
| 928 ->ToPrettyJSONString() | 929 ->ToPrettyJSONString() |
| 929 .Utf8() | 930 .Utf8() |
| 930 .Data()); | 931 .Data()); |
| 931 } | 932 } |
| 932 | 933 |
| 933 } // namespace blink | 934 } // namespace blink |
| OLD | NEW |