Chromium Code Reviews| Index: third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp |
| diff --git a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp |
| index 65054e923856e0906b317c7211c0af88869ea171..53ec88ba13d1c56de9be841278169c992a8ad6a4 100644 |
| --- a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp |
| +++ b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp |
| @@ -162,7 +162,7 @@ TEST_F(DeferredImageDecoderTest, drawIntoPaintRecord) { |
| PaintRecorder recorder; |
| PaintCanvas* tempCanvas = recorder.beginRecording(100, 100); |
| - tempCanvas->drawImage(image.get(), 0, 0); |
| + tempCanvas->drawImage(image, 0, 0); |
| sk_sp<PaintRecord> record = recorder.finishRecordingAsPicture(); |
| EXPECT_EQ(0, m_decodeRequestCount); |
| @@ -186,7 +186,7 @@ TEST_F(DeferredImageDecoderTest, drawIntoPaintRecordProgressive) { |
| ASSERT_TRUE(image); |
| PaintRecorder recorder; |
| PaintCanvas* tempCanvas = recorder.beginRecording(100, 100); |
| - tempCanvas->drawImage(image.get(), 0, 0); |
| + tempCanvas->drawImage(image, 0, 0); |
|
danakj
2017/03/16 20:06:15
move()
|
| m_surface->getCanvas()->drawPicture(recorder.finishRecordingAsPicture()); |
| // Fully received the file and draw the PaintRecord again. |
| @@ -194,7 +194,7 @@ TEST_F(DeferredImageDecoderTest, drawIntoPaintRecordProgressive) { |
| image = m_lazyDecoder->createFrameAtIndex(0); |
| ASSERT_TRUE(image); |
| tempCanvas = recorder.beginRecording(100, 100); |
| - tempCanvas->drawImage(image.get(), 0, 0); |
| + tempCanvas->drawImage(image, 0, 0); |
|
danakj
2017/03/16 20:06:15
move()
|
| m_surface->getCanvas()->drawPicture(recorder.finishRecordingAsPicture()); |
| SkBitmap canvasBitmap; |
| @@ -204,7 +204,7 @@ TEST_F(DeferredImageDecoderTest, drawIntoPaintRecordProgressive) { |
| EXPECT_EQ(SkColorSetARGB(255, 255, 255, 255), canvasBitmap.getColor(0, 0)); |
| } |
| -static void rasterizeMain(PaintCanvas* canvas, PaintRecord* record) { |
| +static void rasterizeMain(PaintCanvas* canvas, sk_sp<PaintRecord> record) { |
| canvas->drawPicture(record); |
| } |
| @@ -217,7 +217,7 @@ TEST_F(DeferredImageDecoderTest, decodeOnOtherThread) { |
| PaintRecorder recorder; |
| PaintCanvas* tempCanvas = recorder.beginRecording(100, 100); |
| - tempCanvas->drawImage(image.get(), 0, 0); |
| + tempCanvas->drawImage(image, 0, 0); |
|
danakj
2017/03/16 20:06:15
move()
|
| sk_sp<PaintRecord> record = recorder.finishRecordingAsPicture(); |
| EXPECT_EQ(0, m_decodeRequestCount); |
| @@ -227,8 +227,7 @@ TEST_F(DeferredImageDecoderTest, decodeOnOtherThread) { |
| thread->getWebTaskRunner()->postTask( |
| BLINK_FROM_HERE, |
| crossThreadBind(&rasterizeMain, |
| - crossThreadUnretained(m_surface->getCanvas()), |
| - crossThreadUnretained(record.get()))); |
| + crossThreadUnretained(m_surface->getCanvas()), record)); |
| thread.reset(); |
| EXPECT_EQ(0, m_decodeRequestCount); |
| @@ -317,7 +316,7 @@ TEST_F(DeferredImageDecoderTest, decodedSize) { |
| // The following code should not fail any assert. |
| PaintRecorder recorder; |
| PaintCanvas* tempCanvas = recorder.beginRecording(100, 100); |
| - tempCanvas->drawImage(image.get(), 0, 0); |
| + tempCanvas->drawImage(image, 0, 0); |
|
danakj
2017/03/16 20:06:15
move()
|
| sk_sp<PaintRecord> record = recorder.finishRecordingAsPicture(); |
| EXPECT_EQ(0, m_decodeRequestCount); |
| m_surface->getCanvas()->drawPicture(record); |