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

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsContextTest.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/GraphicsContextTest.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsContextTest.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsContextTest.cpp
index b67fad7ff0dd84e6754f9dea1ba054282a7113fb..b32f381ec8302dfea70dc982941437d9ce869e35 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsContextTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsContextTest.cpp
@@ -81,18 +81,16 @@ TEST(GraphicsContextTest, Recording) {
context.beginRecording(bounds);
context.fillRect(FloatRect(0, 0, 50, 50), opaque, SkBlendMode::kSrcOver);
- sk_sp<const PaintRecord> record = context.endRecording();
- canvas.drawPicture(record.get());
+ canvas.drawPicture(context.endRecording());
EXPECT_OPAQUE_PIXELS_ONLY_IN_RECT(bitmap, IntRect(0, 0, 50, 50))
context.beginRecording(bounds);
context.fillRect(FloatRect(0, 0, 100, 100), opaque, SkBlendMode::kSrcOver);
- record = context.endRecording();
// Make sure the opaque region was unaffected by the rect drawn during
// recording.
EXPECT_OPAQUE_PIXELS_ONLY_IN_RECT(bitmap, IntRect(0, 0, 50, 50))
- canvas.drawPicture(record.get());
+ canvas.drawPicture(context.endRecording());
EXPECT_OPAQUE_PIXELS_ONLY_IN_RECT(bitmap, IntRect(0, 0, 100, 100))
}
@@ -124,8 +122,7 @@ TEST(GraphicsContextTest, UnboundedDrawsAreClipped) {
// Make the device opaque in 10,10 40x40.
context.fillRect(FloatRect(10, 10, 40, 40), opaque, SkBlendMode::kSrcOver);
- sk_sp<const PaintRecord> record = context.endRecording();
- canvas.drawPicture(record.get());
+ canvas.drawPicture(context.endRecording());
EXPECT_OPAQUE_PIXELS_ONLY_IN_RECT(bitmap, IntRect(10, 10, 40, 40));
context.beginRecording(bounds);
@@ -142,8 +139,7 @@ TEST(GraphicsContextTest, UnboundedDrawsAreClipped) {
flags.setBlendMode(SkBlendMode::kSrcOut);
context.drawPath(path.getSkPath(), flags);
- record = context.endRecording();
- canvas.drawPicture(record.get());
+ canvas.drawPicture(context.endRecording());
EXPECT_OPAQUE_PIXELS_IN_RECT(bitmap, IntRect(20, 10, 30, 40));
}

Powered by Google App Engine
This is Rietveld 408576698