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

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

Issue 2872423002: Tweak PaintInvalidationReasons (Closed)
Patch Set: Rebaseline-cl 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 unified diff | Download patch
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 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 info.rect = EnclosingIntRect(rect); 766 info.rect = EnclosingIntRect(rect);
767 info.client = &client; 767 info.client = &client;
768 auto it = 768 auto it =
769 raster_invalidation_tracking_info_->new_client_debug_names.find(&client); 769 raster_invalidation_tracking_info_->new_client_debug_names.find(&client);
770 if (it == raster_invalidation_tracking_info_->new_client_debug_names.end()) { 770 if (it == raster_invalidation_tracking_info_->new_client_debug_names.end()) {
771 it = raster_invalidation_tracking_info_->old_client_debug_names.find( 771 it = raster_invalidation_tracking_info_->old_client_debug_names.find(
772 &client); 772 &client);
773 // The client should be either in new list or in old list. 773 // The client should be either in new list or in old list.
774 DCHECK(it != 774 DCHECK(it !=
775 raster_invalidation_tracking_info_->old_client_debug_names.end()); 775 raster_invalidation_tracking_info_->old_client_debug_names.end());
776 info.reason = kPaintInvalidationLayoutObjectRemoval; 776 info.reason = PaintInvalidationReason::kDisappeared;
777 } else { 777 } else {
778 info.reason = client.GetPaintInvalidationReason(); 778 info.reason = client.GetPaintInvalidationReason();
779 } 779 }
780 info.client_debug_name = it->value; 780 info.client_debug_name = it->value;
781 raster_invalidation_tracking_info_->map.Add(&chunk).invalidations.push_back( 781 raster_invalidation_tracking_info_->map.Add(&chunk).invalidations.push_back(
782 info); 782 info);
783 } 783 }
784 784
785 void PaintController::GenerateRasterInvalidationsComparingChunks( 785 void PaintController::GenerateRasterInvalidationsComparingChunks(
786 PaintChunk& new_chunk, 786 PaintChunk& new_chunk,
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 show_paint_records 978 show_paint_records
979 ? (DisplayItemList::JsonOptions::kShowPaintRecords | 979 ? (DisplayItemList::JsonOptions::kShowPaintRecords |
980 DisplayItemList::JsonOptions::kShowClientDebugName) 980 DisplayItemList::JsonOptions::kShowClientDebugName)
981 : DisplayItemList::JsonOptions::kShowClientDebugName) 981 : DisplayItemList::JsonOptions::kShowClientDebugName)
982 ->ToPrettyJSONString() 982 ->ToPrettyJSONString()
983 .Utf8() 983 .Utf8()
984 .data()); 984 .data());
985 } 985 }
986 986
987 } // namespace blink 987 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698