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

Unified Diff: third_party/WebKit/Source/platform/graphics/BitmapImage.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/BitmapImage.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp b/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
index 766cadf234a13ec79e6d85bfec2216c8681af312..55cdde875ea27bc6086b234eba3fae38c1cabdeb 100644
--- a/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
+++ b/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
@@ -298,11 +298,15 @@ void BitmapImage::draw(
}
}
- canvas->drawImageRect(image.get(), adjustedSrcRect, adjustedDstRect, &flags,
+ uint32_t uniqueID = image->uniqueID();
+ bool isLazyGenerated = image->isLazyGenerated();
+
+ canvas->drawImageRect(std::move(image), adjustedSrcRect, adjustedDstRect,
+ &flags,
WebCoreClampingModeToSkiaRectConstraint(clampMode));
- if (image->isLazyGenerated())
- PlatformInstrumentation::didDrawLazyPixelRef(image->uniqueID());
+ if (isLazyGenerated)
+ PlatformInstrumentation::didDrawLazyPixelRef(uniqueID);
startAnimation();
}

Powered by Google App Engine
This is Rietveld 408576698