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

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

Issue 2743363006: Clean up cc/paint interfaces (Closed)
Patch Set: Rebase Created 3 years, 9 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 "third_party/skia/include/core/SkPictureAnalyzer.h" 10 #include "third_party/skia/include/core/SkPictureAnalyzer.h"
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 LOG(ERROR) << "New display item: " << newItem.asDebugString(); 760 LOG(ERROR) << "New display item: " << newItem.asDebugString();
761 LOG(ERROR) << "Old display item: " 761 LOG(ERROR) << "Old display item: "
762 << (oldItem ? oldItem->asDebugString() : "None"); 762 << (oldItem ? oldItem->asDebugString() : "None");
763 #else 763 #else
764 LOG(ERROR) << "Run debug build to get more details."; 764 LOG(ERROR) << "Run debug build to get more details.";
765 #endif 765 #endif
766 LOG(ERROR) << "See http://crbug.com/619103."; 766 LOG(ERROR) << "See http://crbug.com/619103.";
767 767
768 #ifndef NDEBUG 768 #ifndef NDEBUG
769 const PaintRecord* newRecord = 769 const PaintRecord* newRecord =
770 newItem.isDrawing() 770 newItem.isDrawing() ? static_cast<const DrawingDisplayItem&>(newItem)
danakj 2017/03/16 20:06:17 maybe a ternary isnt the ring thing here and just
771 ? static_cast<const DrawingDisplayItem&>(newItem).GetPaintRecord() 771 .GetPaintRecord()
772 : nullptr; 772 .get()
773 : nullptr;
773 const PaintRecord* oldRecord = 774 const PaintRecord* oldRecord =
danakj 2017/03/16 20:06:17 same
774 oldItem && oldItem->isDrawing() 775 oldItem && oldItem->isDrawing()
775 ? static_cast<const DrawingDisplayItem*>(oldItem)->GetPaintRecord() 776 ? static_cast<const DrawingDisplayItem*>(oldItem)
777 ->GetPaintRecord()
778 .get()
776 : nullptr; 779 : nullptr;
777 LOG(INFO) << "new record:\n" 780 LOG(INFO) << "new record:\n"
778 << (newRecord ? recordAsDebugString(newRecord) : "None"); 781 << (newRecord ? recordAsDebugString(newRecord) : "None");
779 LOG(INFO) << "old record:\n" 782 LOG(INFO) << "old record:\n"
780 << (oldRecord ? recordAsDebugString(oldRecord) : "None"); 783 << (oldRecord ? recordAsDebugString(oldRecord) : "None");
781 784
782 showDebugData(); 785 showDebugData();
783 #endif // NDEBUG 786 #endif // NDEBUG
784 } 787 }
785 788
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 showPaintRecords 864 showPaintRecords
862 ? (DisplayItemList::JsonOptions::ShowPaintRecords | 865 ? (DisplayItemList::JsonOptions::ShowPaintRecords |
863 DisplayItemList::JsonOptions::ShowClientDebugName) 866 DisplayItemList::JsonOptions::ShowClientDebugName)
864 : DisplayItemList::JsonOptions::ShowClientDebugName) 867 : DisplayItemList::JsonOptions::ShowClientDebugName)
865 ->toPrettyJSONString() 868 ->toPrettyJSONString()
866 .utf8() 869 .utf8()
867 .data()); 870 .data());
868 } 871 }
869 872
870 } // namespace blink 873 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698