Fix debug assertion in CefImageImpl::AddBitmap.

This commit is contained in:
Marshall Greenblatt 2016-08-08 15:56:16 +03:00
parent 968fbacac3
commit 8a68967937
1 changed files with 6 additions and 1 deletions

View File

@ -329,7 +329,12 @@ gfx::ImageSkia CefImageImpl::GetForced1xScaleRepresentation(
bool CefImageImpl::AddBitmap(float scale_factor, bool CefImageImpl::AddBitmap(float scale_factor,
const SkBitmap& bitmap) { const SkBitmap& bitmap) {
#if DCHECK_IS_ON()
{
SkAutoLockPixels bitmap_lock(bitmap);
DCHECK(bitmap.readyToDraw()); DCHECK(bitmap.readyToDraw());
}
#endif
DCHECK(bitmap.colorType() == kBGRA_8888_SkColorType || DCHECK(bitmap.colorType() == kBGRA_8888_SkColorType ||
bitmap.colorType() == kRGBA_8888_SkColorType); bitmap.colorType() == kRGBA_8888_SkColorType);