Commit 95c36fc9 authored by Juanmi Huertas's avatar Juanmi Huertas Committed by Commit Bot

DrawingBuffer should set internal texture to transparent black

It was being set as transparent white, which was the same result, but
it was not really what it should be. This fix also brings consistency
with ImageBitmapRenderingContext

Bug: 1002657
Change-Id: I22baa4935d7e9e0c2adc724b8c3d7e5cb444f15e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1796764
Commit-Queue: Juanmi Huertas <juanmihd@chromium.org>
Reviewed-by: default avatarFernando Serboncini <fserb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695657}
parent b878b5b0
...@@ -559,7 +559,7 @@ scoped_refptr<StaticBitmapImage> DrawingBuffer::TransferToStaticBitmapImage( ...@@ -559,7 +559,7 @@ scoped_refptr<StaticBitmapImage> DrawingBuffer::TransferToStaticBitmapImage(
// space. // space.
SkBitmap black_bitmap; SkBitmap black_bitmap;
black_bitmap.allocN32Pixels(size_.Width(), size_.Height()); black_bitmap.allocN32Pixels(size_.Width(), size_.Height());
black_bitmap.eraseARGB(0, 255, 255, 255); black_bitmap.eraseARGB(0, 0, 0, 0);
return StaticBitmapImage::Create(SkImage::MakeFromBitmap(black_bitmap)); return StaticBitmapImage::Create(SkImage::MakeFromBitmap(black_bitmap));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment