| 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 "third_party/skia/include/core/SkPictureAnalyzer.h" | 10 #include "third_party/skia/include/core/SkPictureAnalyzer.h" |
| (...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 #ifndef NDEBUG | 759 #ifndef NDEBUG |
| 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 = nullptr; |
| 770 newItem.isDrawing() | 770 if (newItem.isDrawing()) { |
| 771 ? static_cast<const DrawingDisplayItem&>(newItem).GetPaintRecord() | 771 newRecord = |
| 772 : nullptr; | 772 static_cast<const DrawingDisplayItem&>(newItem).GetPaintRecord().get(); |
| 773 const PaintRecord* oldRecord = | 773 } |
| 774 oldItem && oldItem->isDrawing() | 774 const PaintRecord* oldRecord = nullptr; |
| 775 ? static_cast<const DrawingDisplayItem*>(oldItem)->GetPaintRecord() | 775 if (oldItem->isDrawing()) { |
| 776 : nullptr; | 776 oldRecord = |
| 777 static_cast<const DrawingDisplayItem*>(oldItem)->GetPaintRecord().get(); |
| 778 } |
| 777 LOG(INFO) << "new record:\n" | 779 LOG(INFO) << "new record:\n" |
| 778 << (newRecord ? recordAsDebugString(newRecord) : "None"); | 780 << (newRecord ? recordAsDebugString(newRecord) : "None"); |
| 779 LOG(INFO) << "old record:\n" | 781 LOG(INFO) << "old record:\n" |
| 780 << (oldRecord ? recordAsDebugString(oldRecord) : "None"); | 782 << (oldRecord ? recordAsDebugString(oldRecord) : "None"); |
| 781 | 783 |
| 782 showDebugData(); | 784 showDebugData(); |
| 783 #endif // NDEBUG | 785 #endif // NDEBUG |
| 784 } | 786 } |
| 785 | 787 |
| 786 void PaintController::checkUnderInvalidation() { | 788 void PaintController::checkUnderInvalidation() { |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 861 showPaintRecords | 863 showPaintRecords |
| 862 ? (DisplayItemList::JsonOptions::ShowPaintRecords | | 864 ? (DisplayItemList::JsonOptions::ShowPaintRecords | |
| 863 DisplayItemList::JsonOptions::ShowClientDebugName) | 865 DisplayItemList::JsonOptions::ShowClientDebugName) |
| 864 : DisplayItemList::JsonOptions::ShowClientDebugName) | 866 : DisplayItemList::JsonOptions::ShowClientDebugName) |
| 865 ->toPrettyJSONString() | 867 ->toPrettyJSONString() |
| 866 .utf8() | 868 .utf8() |
| 867 .data()); | 869 .data()); |
| 868 } | 870 } |
| 869 | 871 |
| 870 } // namespace blink | 872 } // namespace blink |
| OLD | NEW |