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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp

Issue 2817563002: Always pair begin and end subsequence calls (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/paint/SubsequenceRecorder.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/paint/SubsequenceRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698