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

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

Issue 2743363006: Clean up cc/paint interfaces (Closed)
Patch Set: Fix PaintControllerTest v2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
index 0df90d0a9753d32a449ab89e0a001078987f05ec..ebd50c5e7910d325ed1db68c9448b3eb8109c6c8 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
@@ -766,14 +766,16 @@ void PaintController::showUnderInvalidationError(
LOG(ERROR) << "See http://crbug.com/619103.";
#ifndef NDEBUG
- const PaintRecord* newRecord =
- newItem.isDrawing()
- ? static_cast<const DrawingDisplayItem&>(newItem).GetPaintRecord()
- : nullptr;
- const PaintRecord* oldRecord =
- oldItem && oldItem->isDrawing()
- ? static_cast<const DrawingDisplayItem*>(oldItem)->GetPaintRecord()
- : nullptr;
+ const PaintRecord* newRecord = nullptr;
+ if (newItem.isDrawing()) {
+ newRecord =
+ static_cast<const DrawingDisplayItem&>(newItem).GetPaintRecord().get();
+ }
+ const PaintRecord* oldRecord = nullptr;
+ if (oldItem->isDrawing()) {
+ oldRecord =
+ static_cast<const DrawingDisplayItem*>(oldItem)->GetPaintRecord().get();
+ }
LOG(INFO) << "new record:\n"
<< (newRecord ? recordAsDebugString(newRecord) : "None");
LOG(INFO) << "old record:\n"

Powered by Google App Engine
This is Rietveld 408576698