Navigation Menu

Skip to content

Commit

Permalink
ImageBufferCairo: memset the fast-malloced memory to 0.
Browse files Browse the repository at this point in the history
  • Loading branch information
zdobersek committed Jan 11, 2017
1 parent 539f010 commit 847ba8b
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -243,6 +243,7 @@ ImageBuffer::ImageBuffer(const FloatSize& size, float resolutionScale, ColorSpac
{
int stride = cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, m_size.width());
m_data.m_surfaceData = MallocPtr<unsigned char>::malloc(m_size.height() * stride);
memset(m_data.m_surfaceData.get(), 0, m_size.height() * stride);
m_data.m_surface = adoptRef(cairo_image_surface_create_for_data(m_data.m_surfaceData.get(), CAIRO_FORMAT_ARGB32, m_size.width(), m_size.height(), stride));
}

Expand Down

0 comments on commit 847ba8b

Please sign in to comment.