diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-24 17:19:43 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-24 18:38:11 +0000 |
commit | efe28833d484e6c59ce928e4218a07752262c5e9 (patch) | |
tree | f192cf333e674d8970ff739481f788f83b354f4c /vcl/unx | |
parent | 28f909df366d731ee0684d0608e5a00dcf70181c (diff) |
make ScanlineStride an argument to createBitmapDevice
so we could create bitmap devices that have the same stride that cairo expects,
provide getBitmapDeviceStrideForWidth to get a default value
Change-Id: I7ecc6f54a734b3f6bed59c699ac3b482c4ad7c47
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/gtk/window/gtksalframe.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx index 82c70e7cdd19..812ff5053a11 100644 --- a/vcl/unx/gtk/window/gtksalframe.cxx +++ b/vcl/unx/gtk/window/gtksalframe.cxx @@ -1965,8 +1965,9 @@ void GtkSalFrame::AllocateFrame() aFrameSize.setX( 1 ); if( aFrameSize.getY() == 0 ) aFrameSize.setY( 1 ); - m_aFrame = basebmp::createBitmapDevice( aFrameSize, true, - basebmp::FORMAT_TWENTYFOUR_BIT_TC_MASK ); + sal_Int32 nStride(basebmp::getBitmapDeviceStrideForWidth(basebmp::FORMAT_TWENTYFOUR_BIT_TC_MASK, aFrameSize.getX())); + m_aFrame = basebmp::createBitmapDevice(aFrameSize, true, + basebmp::FORMAT_TWENTYFOUR_BIT_TC_MASK, nStride); m_aFrame->setDamageTracker( basebmp::IBitmapDeviceDamageTrackerSharedPtr(new DamageTracker(*this)) ); fprintf( stderr, "allocated m_aFrame size of %dx%d \n", |