equal
deleted
inserted
replaced
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
47 CDrawXxxBppBitmap::iScanLineWords = iHelper.BytesPerScanline() / 4; |
47 CDrawXxxBppBitmap::iScanLineWords = iHelper.BytesPerScanline() / 4; |
48 if (CDrawXxxBppBitmap::iScanLineWords==0) |
48 if (CDrawXxxBppBitmap::iScanLineWords==0) |
49 { //Note: This will cause WServ startup to fail. WServ only accepts KErrNotSupported |
49 { //Note: This will cause WServ startup to fail. WServ only accepts KErrNotSupported |
50 return KErrHardwareNotAvailable; |
50 return KErrHardwareNotAvailable; |
51 } |
51 } |
52 TInt ret = CDrawXxxBppBitmap::Construct(aSize); |
52 TInt ret = CDrawXxxBppBitmap::Construct(aSize, iHelper.BytesPerScanline()); |
53 if (ret == KErrNone) |
53 if (ret == KErrNone) |
54 { |
54 { |
55 CDrawXxxBppBitmap::iBits = (TUint32*)iHelper.AddressFirstPixel(); |
55 CDrawXxxBppBitmap::iBits = (TUint32*)iHelper.AddressFirstPixel(); |
56 if (CDrawXxxBppBitmap::iBits==NULL) |
56 if (CDrawXxxBppBitmap::iBits==NULL) |
57 { //Note: This will cause WServ startup to fail. WServ only accepts KErrNotSupported |
57 { //Note: This will cause WServ startup to fail. WServ only accepts KErrNotSupported |