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

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayer.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/GraphicsLayer.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
index 633df72db2143dc74d4e8042d50eeb7bf1c862bd..ac1c32561660743c08256d10c4afad55f42df0ab 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
@@ -280,7 +280,7 @@ void GraphicsLayer::paint(const IntRect* interestRect,
offsetFromLayoutObjectWithSubpixelAccumulation());
if (RuntimeEnabledFeatures::paintUnderInvalidationCheckingEnabled()) {
sk_sp<PaintRecord> record = captureRecord();
- checkPaintUnderInvalidations(*record);
+ checkPaintUnderInvalidations(record);
RasterInvalidationTracking& tracking =
rasterInvalidationTrackingMap().add(this);
tracking.lastPaintedRecord = std::move(record);
@@ -1202,7 +1202,7 @@ static bool pixelsDiffer(SkColor p1, SkColor p2) {
pixelComponentsDiffer(SkColorGetB(p1), SkColorGetB(p2));
}
-void GraphicsLayer::checkPaintUnderInvalidations(const PaintRecord& newRecord) {
+void GraphicsLayer::checkPaintUnderInvalidations(sk_sp<PaintRecord> newRecord) {
if (!drawsContent())
return;
@@ -1225,7 +1225,7 @@ void GraphicsLayer::checkPaintUnderInvalidations(const PaintRecord& newRecord) {
SkiaPaintCanvas canvas(oldBitmap);
canvas.clear(SK_ColorTRANSPARENT);
canvas.translate(-rect.x(), -rect.y());
- canvas.drawPicture(tracking->lastPaintedRecord.get());
+ canvas.drawPicture(tracking->lastPaintedRecord);
}
SkBitmap newBitmap;
@@ -1235,7 +1235,7 @@ void GraphicsLayer::checkPaintUnderInvalidations(const PaintRecord& newRecord) {
SkiaPaintCanvas canvas(newBitmap);
canvas.clear(SK_ColorTRANSPARENT);
canvas.translate(-rect.x(), -rect.y());
- canvas.drawPicture(&newRecord);
+ canvas.drawPicture(std::move(newRecord));
}
oldBitmap.lockPixels();
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/GraphicsLayer.h ('k') | third_party/WebKit/Source/platform/graphics/Image.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698