Chromium Code Reviews| Index: third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.cpp |
| diff --git a/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.cpp b/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.cpp |
| index 7f7c5744c6ecfc23c242710a9b8c4a64d3b44452..d66e77c8ddcc58558b7d9a23acd2bd3b38ffa8c9 100644 |
| --- a/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.cpp |
| +++ b/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.cpp |
| @@ -35,7 +35,7 @@ void ImageBitmapRenderingContext::transferFromImageBitmap(ImageBitmap* imageBitm |
| if (!m_image) |
| return; |
| - RefPtr<SkImage> skImage = m_image->imageForCurrentFrame(); |
| + sk_sp<SkImage> skImage = m_image->imageForCurrentFrame(); |
| if (skImage->isTextureBacked()) { |
| // TODO(junov): crbug.com/585607 Eliminate this readback and use an ExternalTextureLayer |
| sk_sp<SkSurface> surface = SkSurface::MakeRasterN32Premul(skImage->width(), skImage->height()); |
| @@ -45,7 +45,7 @@ void ImageBitmapRenderingContext::transferFromImageBitmap(ImageBitmap* imageBitm |
| return; |
| } |
| surface->getCanvas()->drawImage(skImage.get(), 0, 0); |
|
f(malita)
2016/09/01 03:55:37
Nit: drop the .get(). it's cleaner.
Łukasz Anforowicz
2016/09/01 20:50:57
Done.
|
| - m_image = StaticBitmapImage::create(fromSkSp(surface->makeImageSnapshot())); |
| + m_image = StaticBitmapImage::create(surface->makeImageSnapshot()); |
| } |
| canvas()->didDraw(FloatRect(FloatPoint(), FloatSize(m_image->width(), m_image->height()))); |
| } |