1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/graphicsdeviceinterface/directgdi/test/tbitbltmasked.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,616 @@
1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#include "tbitbltmasked.h"
1.20 +
1.21 +CTBitBltMasked::CTBitBltMasked()
1.22 + {
1.23 + SetTestStepName(KTDirectGdiBitBltMaskedStep);
1.24 + }
1.25 +
1.26 +CTBitBltMasked::~CTBitBltMasked()
1.27 + {
1.28 + }
1.29 +
1.30 +/**
1.31 +Override of base class pure virtual
1.32 +Lists the tests to be run
1.33 +*/
1.34 +void CTBitBltMasked::RunTestsL()
1.35 + {
1.36 + if(iUseDirectGdi && !iUseSwDirectGdi)
1.37 + {
1.38 + // In the event that a test leaves after a BitBlt() or DrawBitmap() has occurred
1.39 + // the vgimage cache will need to be reset.
1.40 + // This needs to be the first item on the cleanupstack,
1.41 + // as some tests perform pushes and pops of bitmaps.
1.42 + CleanupStack::PushL(TCleanupItem(ResetCache, iVgImageCache));
1.43 + }
1.44 +
1.45 + BeginMaskIteration();
1.46 + // to minimize tests call number these tests are processed only for one mask
1.47 + if(!iLargeTarget)
1.48 + {
1.49 + SetTestStepID(_L("GRAPHICS-DIRECTGDI-BITBLTMASKED-0003"));
1.50 + TestInvalidParametersL();
1.51 + RecordTestResultL();
1.52 + SetTestStepID(_L("GRAPHICS-DIRECTGDI-BITBLTMASKED-0004"));
1.53 + TestSourceBitmapCloningL();
1.54 + RecordTestResultL();
1.55 + SetTestStepID(_L("GRAPHICS-DIRECTGDI-BITBLTMASKED-0005"));
1.56 + TestMaskCloningL();
1.57 + RecordTestResultL();
1.58 + }
1.59 + do
1.60 + {
1.61 + if(!iLargeTarget)
1.62 + {
1.63 + iTestParams.iDoCompressed = ETrue;
1.64 + SetTestStepID(_L("GRAPHICS-DIRECTGDI-BITBLTMASKED-0001"));
1.65 + TestBasicL();
1.66 + RecordTestResultL();
1.67 + iTestParams.iDoCompressed = EFalse;
1.68 + SetTestStepID(_L("GRAPHICS-DIRECTGDI-BITBLTMASKED-0006"));
1.69 + TestDrawModeL();
1.70 + RecordTestResultL();
1.71 + SetTestStepID(_L("GRAPHICS-DIRECTGDI-BITBLTMASKED-0007"));
1.72 + TestWithSameBitmapsL();
1.73 + RecordTestResultL();
1.74 + SetTestStepID(_L("GRAPHICS-DIRECTGDI-BITBLTMASKED-0008"));
1.75 + TestSetOriginL();
1.76 + RecordTestResultL();
1.77 + }
1.78 + else
1.79 + {
1.80 + SetTestStepID(_L("GRAPHICS-DIRECTGDI-BITBLTMASKED-0002"));
1.81 + TestPositioningL();
1.82 + RecordTestResultL();
1.83 + }
1.84 + }
1.85 + while(NextMaskIteration());
1.86 +
1.87 + if(iUseDirectGdi && !iUseSwDirectGdi)
1.88 + {
1.89 + CleanupStack::PopAndDestroy(iVgImageCache);
1.90 + }
1.91 + }
1.92 +
1.93 +/**
1.94 +@SYMTestCaseID
1.95 + GRAPHICS-DIRECTGDI-BITBLTMASKED-0001
1.96 +
1.97 +@SYMPREQ
1.98 + PREQ39
1.99 +
1.100 +@SYMREQ
1.101 + REQ9198
1.102 + REQ9204
1.103 + REQ9195
1.104 + REQ9201
1.105 + REQ9202
1.106 + REQ9222
1.107 + REQ9223
1.108 + REQ9236
1.109 + REQ9237
1.110 +
1.111 +@SYMTestCaseDesc
1.112 + Bit blitting with masking basic functionality.
1.113 +
1.114 +@SYMTestPriority
1.115 + Critical
1.116 +
1.117 +@SYMTestStatus
1.118 + Implemented
1.119 +
1.120 +@SYMTestActions
1.121 + Test bit blitting with masking for basic and valid parameters.
1.122 +
1.123 +@SYMTestExpectedResults
1.124 + Source bitmap should be copied into target area. Basic or inverted
1.125 + masking should be considered. Valid bitmap should be created. This
1.126 + bitmap should be the same as a reference bitmap.
1.127 +*/
1.128 +void CTBitBltMasked::TestBasicL()
1.129 + {
1.130 + _LIT(KTestName, "BitBltMasked-Basic");
1.131 + _LIT(KTestNameNegative, "BitBltMasked-Basic-NegativeMaskPosition");
1.132 + if(!iRunningOomTests)
1.133 + {
1.134 + INFO_PRINTF1(KTestName);
1.135 + }
1.136 +
1.137 + ResetGc();
1.138 + CFbsBitmap* bitmap;
1.139 + CFbsBitmap* mask;
1.140 + if(iTestParams.iDoCompressed)
1.141 + {
1.142 + bitmap = iCompressedBitmap;
1.143 + mask = iCompressedMaskL8;
1.144 + }
1.145 + else
1.146 + {
1.147 + bitmap = iCheckedBoardBitmap2;
1.148 + mask = iCurrentMask1;
1.149 + }
1.150 +
1.151 + TRect bmpRect(TPoint(0, 0), bitmap->SizeInPixels());
1.152 + if(iMaskPixelFormat == EUidPixelFormatL_1)
1.153 + {
1.154 + iGc->BitBltMasked(TPoint(20, 20), *bitmap, bmpRect, *mask, iInvertMask);
1.155 + iGc->BitBltMasked(TPoint(20, 20), *bitmap, bmpRect, *mask, ETrue);
1.156 + }
1.157 + else
1.158 + {
1.159 + iGc->BitBltMasked(TPoint(20, 20), *bitmap, bmpRect, *mask, TPoint(0, 0));
1.160 + }
1.161 + TESTNOERROR(iGc->GetError());
1.162 + if(!iTestParams.iDoCompressed)
1.163 + WriteTargetOutput(KTestName());
1.164 +
1.165 + // negative mask position
1.166 + iGc->BitBltMasked(TPoint(-35, 180), *bitmap, bmpRect, *iMask1L8, TPoint(-1, -1));
1.167 + TESTNOERROR(iGc->GetError());
1.168 +
1.169 + // mask position greater than mask size
1.170 + iGc->BitBltMasked(TPoint(-35, 200), *bitmap, bmpRect, *iMask1L8, iMask1L8->SizeInPixels().AsPoint());
1.171 + CheckErrorsL(KErrNone, KErrArgument, (TText8*)__FILE__, __LINE__);
1.172 +
1.173 + if(!iTestParams.iDoCompressed)
1.174 + TESTNOERRORL(WriteTargetOutput(KTestNameNegative()));
1.175 + }
1.176 +
1.177 +/**
1.178 +@SYMTestCaseID
1.179 + GRAPHICS-DIRECTGDI-BITBLTMASKED-0002
1.180 +
1.181 +@SYMPREQ
1.182 + PREQ39
1.183 +
1.184 +@SYMREQ
1.185 + REQ9197
1.186 + REQ9198
1.187 + REQ9204
1.188 + REQ9195
1.189 + REQ9201
1.190 + REQ9202
1.191 + REQ9222
1.192 + REQ9223
1.193 + REQ9236
1.194 + REQ9237
1.195 +
1.196 +@SYMTestCaseDesc
1.197 + Various combinations of destination positions, source position and size
1.198 + of a bitmap are tested. Test also covers mask alignment, tiling and boundary
1.199 + parameters.
1.200 +
1.201 +@SYMTestPriority
1.202 + Critical
1.203 +
1.204 +@SYMTestStatus
1.205 + Implemented
1.206 +
1.207 +@SYMTestActions
1.208 + Covers the whole target bitmap starting from TPoint(-30,-30) with staggered blits of a small 8x8 bitmap.
1.209 + Test positioning functionality of BitBltMasked() methods. Test boundary
1.210 + conditions, tiling and clipping to surface area.
1.211 +
1.212 +@SYMTestExpectedResults
1.213 +*/
1.214 +void CTBitBltMasked::TestPositioningL()
1.215 + {
1.216 + _LIT(KTestName, "BitBltMasked-Positioning");
1.217 + if(!iRunningOomTests)
1.218 + {
1.219 + INFO_PRINTF1(KTestName);
1.220 + }
1.221 + iTestParams.iDoCompressed = ETrue;
1.222 + TestPositioningBaseL(KTestName(), EBitBltMasked);
1.223 + iTestParams.iDoCompressed = EFalse;
1.224 + TestPositioningBaseL(KTestName(), EBitBltMasked);
1.225 + }
1.226 +
1.227 +/**
1.228 +@SYMTestCaseID
1.229 + GRAPHICS-DIRECTGDI-BITBLTMASKED-0003
1.230 +
1.231 +@SYMPREQ
1.232 + PREQ39
1.233 +
1.234 +@SYMREQ
1.235 + REQ9197
1.236 + REQ9198
1.237 + REQ9204
1.238 + REQ9195
1.239 + REQ9222
1.240 + REQ9223
1.241 + REQ9236
1.242 + REQ9237
1.243 +
1.244 +@SYMTestCaseDesc
1.245 + Calling BitBltMasked() method with invalid parameters
1.246 +
1.247 +@SYMTestPriority
1.248 + Critical
1.249 +
1.250 +@SYMTestStatus
1.251 + Implemented
1.252 +
1.253 +@SYMTestActions
1.254 + Invalid source rect:
1.255 + - TRect(-30, -30, -10, -10);
1.256 + - TRect(bmpWidth+10, bmpHeight+10, bmpWidth+20, bmpHeight+20);
1.257 + - TRect(bmpWidth, bmpHeight, 0, 0);
1.258 + - TRect(-10, -10, -30, -30);
1.259 + - TRect(0, 0, 0, 0);
1.260 + Invalid mask (aMaskBitmap):
1.261 + - zero size mask
1.262 + - not initialized mask
1.263 + Mask position greater than mask size: aMaskPt = TPoint(mask_width, mask_height)
1.264 + Invalid source bitmap:
1.265 + - zero size bitmap
1.266 + - not initialised bitmap
1.267 +
1.268 +@SYMTestExpectedResults
1.269 + Function should detect invalid parameters and return. Nothing should be drawn
1.270 + in a target area.
1.271 +*/
1.272 +void CTBitBltMasked::TestInvalidParametersL()
1.273 + {
1.274 + _LIT(KTestName, "BitBltMasked-InvalidParameters");
1.275 + if(!iRunningOomTests)
1.276 + {
1.277 + INFO_PRINTF1(KTestName);
1.278 + }
1.279 + TestInvalidParametersBaseL(KTestName(), EBitBltMasked);
1.280 + }
1.281 +
1.282 +/**
1.283 +@SYMTestCaseID
1.284 + GRAPHICS-DIRECTGDI-BITBLTMASKED-0004
1.285 +
1.286 +@SYMPREQ
1.287 + PREQ39
1.288 +
1.289 +@SYMREQ
1.290 + REQ9197
1.291 + REQ9204
1.292 + REQ9195
1.293 + REQ9201
1.294 + REQ9202
1.295 + REQ9222
1.296 + REQ9223
1.297 + REQ9236
1.298 + REQ9237
1.299 +
1.300 +@SYMTestCaseDesc
1.301 + Tests that masked bitmaps are drawn correctly if they
1.302 + are deleted immediately after BitBltMasked() is called, but before Finish() is called.
1.303 +
1.304 +@SYMTestPriority
1.305 + Critical
1.306 +
1.307 +@SYMTestStatus
1.308 + Implemented
1.309 +
1.310 +@SYMTestActions
1.311 + Set valid mask parameters (see BitBltMasked-Basic).
1.312 + For test description see BitBlt-SourceBitmapCloning.
1.313 +
1.314 +@SYMTestExpectedResults
1.315 + Source bitmap should be copied into target area. Memory leaks should not
1.316 + be created. Valid bitmap should be created. This bitmap should be
1.317 + the same as a reference bitmap.
1.318 +*/
1.319 +void CTBitBltMasked::TestSourceBitmapCloningL()
1.320 + {
1.321 + _LIT(KTestName, "BitBltMasked-SourceBitmapCloning");
1.322 + if(!iRunningOomTests)
1.323 + {
1.324 + INFO_PRINTF1(KTestName);
1.325 + }
1.326 + iTestParams.iDoCompressed = ETrue;
1.327 + TestSourceBitmapCloningBaseL(KTestName(), EBitBltMasked);
1.328 + iTestParams.iDoCompressed = EFalse;
1.329 + TestSourceBitmapCloningBaseL(KTestName(), EBitBltMasked);
1.330 + }
1.331 +
1.332 +/**
1.333 +@SYMTestCaseID
1.334 + GRAPHICS-DIRECTGDI-BITBLTMASKED-0005
1.335 +
1.336 +@SYMPREQ
1.337 + PREQ39
1.338 +
1.339 +@SYMREQ
1.340 + REQ9197
1.341 + REQ9204
1.342 + REQ9195
1.343 + REQ9201
1.344 + REQ9202
1.345 + REQ9222
1.346 + REQ9223
1.347 + REQ9236
1.348 + REQ9237
1.349 +
1.350 +@SYMTestCaseDesc
1.351 + Tests that masked bitmaps are drawn correctly if the mask
1.352 + is deleted immediately after BitBltMasked() is called, but before Finish() is called.
1.353 +
1.354 +@SYMTestPriority
1.355 + Critical
1.356 +
1.357 +@SYMTestStatus
1.358 + Implemented
1.359 +
1.360 +@SYMTestActions
1.361 + 1. Invoke the BitBltMasked() method with valid parameters (see BitBltMasked-Basic).
1.362 + 2. Right after returning from BitBltMasked() call, destroy the source mask (aMaskBitmap).
1.363 + 3. Call the BitBltMasked() method again with the same mask parameter.
1.364 + Repeat p. 1-3 a few times.
1.365 +
1.366 +@SYMTestExpectedResults
1.367 + Source bitmap should be copied into target area and should be correctly masked.
1.368 + Memory leaks should not be created. Valid bitmap should be created. This bitmap
1.369 + should be the same as a reference bitmap.
1.370 +*/
1.371 +void CTBitBltMasked::TestMaskCloningL()
1.372 + {
1.373 + _LIT(KTestName, "BitBltMasked-MaskCloning");
1.374 + if(!iRunningOomTests)
1.375 + {
1.376 + INFO_PRINTF1(KTestName);
1.377 + }
1.378 + iTestParams.iDoCompressed = ETrue;
1.379 + TestMaskCloningBaseL(KTestName(), EBitBltMasked);
1.380 + iTestParams.iDoCompressed = EFalse;
1.381 + TestMaskCloningBaseL(KTestName(), EBitBltMasked);
1.382 + }
1.383 +
1.384 +/**
1.385 +@SYMTestCaseID
1.386 + GRAPHICS-DIRECTGDI-BITBLTMASKED-0006
1.387 +
1.388 +@SYMPREQ
1.389 + PREQ39
1.390 +
1.391 +@SYMREQ
1.392 + REQ9198
1.393 + REQ9204
1.394 + REQ9195
1.395 + REQ9201
1.396 + REQ9202
1.397 + REQ9222
1.398 + REQ9223
1.399 + REQ9236
1.400 + REQ9237
1.401 +
1.402 +@SYMTestCaseDesc
1.403 + Test correctness of bit blitting with mask in all possible draw modes.
1.404 +
1.405 +@SYMTestPriority
1.406 + Critical
1.407 +
1.408 +@SYMTestStatus
1.409 + Implemented
1.410 +
1.411 +@SYMTestActions
1.412 + Set valid parameters (see BitBltMasked-Basic).
1.413 + Use the semi-transparent source bitmap (iCheckedBoardWithAlphaBitmap).
1.414 + Set drawmode to EDrawModePEN and call the methods.
1.415 + Set drawmode to EDrawModeWriteAlpha and call the methods.
1.416 +
1.417 +@SYMTestExpectedResults
1.418 + Semi-transparent (for EDrawModePEN) and opaque (for EDrawModeWriteAlpha)
1.419 + should be copied into rendering target. Valid bitmap should be created.
1.420 + This bitmap should be the same as a reference bitmap.
1.421 +*/
1.422 +void CTBitBltMasked::TestDrawModeL()
1.423 + {
1.424 + _LIT(KTestName, "BitBltMasked-DrawMode");
1.425 + if(!iRunningOomTests)
1.426 + {
1.427 + INFO_PRINTF1(KTestName);
1.428 + }
1.429 + ResetGc();
1.430 +
1.431 + TSize bmpSize(iCheckedBoardWithAlphaBitmap->SizeInPixels());
1.432 +
1.433 + TInt halfHeight = (bmpSize.iHeight >> 1);
1.434 + TInt quarterWidth = (bmpSize.iWidth >> 2);
1.435 + TInt y1 = halfHeight - (bmpSize.iHeight >> 2);
1.436 + TSize vertRectSize (quarterWidth, bmpSize.iHeight);
1.437 + TSize horizRectSize (bmpSize.iWidth, halfHeight);
1.438 +
1.439 + // EDrawModeWriteAlpha is not supported in the following modes
1.440 + // This is tested under invalid parameter tests.
1.441 + if (!((iMaskPixelFormat == EUidPixelFormatL_8) &&
1.442 + ((iTestParams.iSourcePixelFormat == EUidPixelFormatARGB_8888) ||
1.443 + (iTestParams.iSourcePixelFormat == EUidPixelFormatARGB_8888_PRE))))
1.444 + {
1.445 + // Render column to left
1.446 + iGc->SetDrawMode(DirectGdi::EDrawModeWriteAlpha);
1.447 + iGc->BitBltMasked(
1.448 + TPoint(0, 0),
1.449 + *iCheckedBoardWithAlphaBitmap,
1.450 + TRect(TPoint(0, 0), vertRectSize),
1.451 + *iCurrentMask2,
1.452 + TPoint(0, 0));
1.453 + }
1.454 +
1.455 + // Render row in center
1.456 + iGc->SetDrawMode(DirectGdi::EDrawModePEN);
1.457 + iGc->BitBltMasked(
1.458 + TPoint(0, y1),
1.459 + *iCheckedBoardWithAlphaBitmap,
1.460 + TRect(TPoint(0, 0), horizRectSize),
1.461 + *iCurrentMask2,
1.462 + TPoint(0, 0));
1.463 +
1.464 + // EDrawModeWriteAlpha is not supported in the following modes
1.465 + // This is tested under invalid parameter tests.
1.466 + if (!((iMaskPixelFormat == EUidPixelFormatL_8) &&
1.467 + ((iTestParams.iSourcePixelFormat == EUidPixelFormatARGB_8888) ||
1.468 + (iTestParams.iSourcePixelFormat == EUidPixelFormatARGB_8888_PRE))))
1.469 + {
1.470 + // Render column to right
1.471 + iGc->SetDrawMode(DirectGdi::EDrawModeWriteAlpha);
1.472 + iGc->BitBltMasked(
1.473 + TPoint(bmpSize.iWidth - quarterWidth, 0),
1.474 + *iCheckedBoardWithAlphaBitmap,
1.475 + TRect(TPoint(0, 0), vertRectSize),
1.476 + *iCurrentMask2,
1.477 + TPoint(0, 0));
1.478 + }
1.479 +
1.480 + TESTNOERRORL(iGc->GetError());
1.481 +
1.482 + TESTNOERRORL(WriteTargetOutput(KTestName()));
1.483 + }
1.484 +
1.485 +/**
1.486 +@SYMTestCaseID
1.487 + GRAPHICS-DIRECTGDI-BITBLTMASKED-0007
1.488 +
1.489 +@SYMPREQ
1.490 + PREQ39
1.491 +
1.492 +@SYMREQ
1.493 + REQ9198
1.494 + REQ9204
1.495 + REQ9195
1.496 + REQ9201
1.497 + REQ9202
1.498 + REQ9222
1.499 + REQ9223
1.500 + REQ9236
1.501 + REQ9237
1.502 +
1.503 +@SYMTestCaseDesc
1.504 + Test the basic functionality of bit blitting with masking.
1.505 +
1.506 +@SYMTestPriority
1.507 + Critical
1.508 +
1.509 +@SYMTestStatus
1.510 + Implemented
1.511 +
1.512 +@SYMTestActions
1.513 + Test bit blitting with masking for same source and mask bitmaps.
1.514 +
1.515 +@SYMTestExpectedResults
1.516 + Source bitmap should be copied into target area. Basic or inverted
1.517 + masking should be considered. Valid bitmap should be created. This
1.518 + bitmap should be the same as a reference bitmap.
1.519 +*/
1.520 +void CTBitBltMasked::TestWithSameBitmapsL()
1.521 + {
1.522 + _LIT(KTestName, "BitBltMasked-SameBitmaps");
1.523 + ResetGc();
1.524 + TRect bmpRect1(TPoint(0, 0), iBlackWhiteBitmap->SizeInPixels());
1.525 + iGc->SetOrigin(TPoint(30, 30));
1.526 + iGc->BitBltMasked(TPoint(0, 0), *iBlackWhiteBitmap, bmpRect1, *iBlackWhiteBitmap, ETrue);
1.527 + iGc->BitBltMasked(TPoint(0, 0), *iBlackWhiteBitmap, bmpRect1, *iBlackWhiteBitmap, EFalse);
1.528 + TESTNOERRORL(iGc->GetError());
1.529 + //Write target only if image is not empty. BitGDI is producing white images when Mask pixel format is EUidPixelFormatL_8
1.530 + TBool pass = TestTargetL(KRgbWhite);
1.531 + if(!pass)
1.532 + {
1.533 + TESTNOERRORL(WriteTargetOutput(KTestName()));
1.534 + }
1.535 + }
1.536 +
1.537 +/**
1.538 +@SYMTestCaseID
1.539 + GRAPHICS-DIRECTGDI-BITBLTMASKED-0008
1.540 +
1.541 +@SYMPREQ
1.542 + PREQ39
1.543 +
1.544 +@SYMREQ
1.545 + REQ9198
1.546 + REQ9204
1.547 + REQ9195
1.548 + REQ9201
1.549 + REQ9202
1.550 + REQ9222
1.551 + REQ9223
1.552 + REQ9236
1.553 + REQ9237
1.554 +
1.555 +@SYMTestCaseDesc
1.556 + Test that BitBltMasked() performs correctly when it is called after SetOrigin().
1.557 +
1.558 +@SYMTestPriority
1.559 + Critical
1.560 +
1.561 +@SYMTestStatus
1.562 + Implemented
1.563 +
1.564 +@SYMTestActions
1.565 + Call SetOrigin().
1.566 + Call BitBltMasked().
1.567 +
1.568 +@SYMTestExpectedResults
1.569 + Source bitmap should be copied into target area. Basic or inverted
1.570 + masking should be considered. Valid bitmap should be created. This
1.571 + bitmap should be the same as a reference bitmap.
1.572 +*/
1.573 +void CTBitBltMasked::TestSetOriginL()
1.574 + {
1.575 + _LIT(KTestName, "BitBltMasked-SetOrigin");
1.576 + _LIT(KTestNameNegative, "BitBltMasked-SetOrigin-NegativeMaskPosition");
1.577 +
1.578 + // Only do test for one pixel format to cut down on the number of images produced
1.579 + // as this is just a positional test and we don't need to test for all pixel formats.
1.580 + if (!((iTestParams.iTargetPixelFormat == EUidPixelFormatRGB_565) && (iTestParams.iSourcePixelFormat == EUidPixelFormatRGB_565)))
1.581 + {
1.582 + return;
1.583 + }
1.584 +
1.585 + if(!iRunningOomTests)
1.586 + {
1.587 + INFO_PRINTF1(KTestName);
1.588 + }
1.589 +
1.590 + ResetGc();
1.591 + CFbsBitmap* bitmap = iCheckedBoardBitmap2;
1.592 + CFbsBitmap* mask = iCurrentMask1;
1.593 +
1.594 + TRect bmpRect(TPoint(0, 0), bitmap->SizeInPixels());
1.595 + iGc->SetOrigin(TPoint(-35, 80));
1.596 + if(iMaskPixelFormat == EUidPixelFormatL_1)
1.597 + {
1.598 + iGc->BitBltMasked(TPoint(55, -60), *bitmap, bmpRect, *mask, iInvertMask);
1.599 + iGc->BitBltMasked(TPoint(55, -60), *bitmap, bmpRect, *mask, ETrue);
1.600 + }
1.601 + else
1.602 + {
1.603 + iGc->BitBltMasked(TPoint(55, -60), *bitmap, bmpRect, *mask, TPoint(0, 0));
1.604 + }
1.605 + TESTNOERROR(iGc->GetError());
1.606 + TESTNOERRORL(WriteTargetOutput(KTestName()));
1.607 +
1.608 + // negative mask position
1.609 + iGc->BitBltMasked(TPoint(0, 100), *bitmap, bmpRect, *iMask1L8, TPoint(-1, -1));
1.610 + TESTNOERROR(iGc->GetError());
1.611 +
1.612 + // mask position greater than mask size
1.613 + iGc->BitBltMasked(TPoint(0, 120), *bitmap, bmpRect, *iMask1L8, iMask1L8->SizeInPixels().AsPoint());
1.614 + CheckErrorsL(KErrNone, KErrArgument, (TText8*)__FILE__, __LINE__);
1.615 +
1.616 + TESTNOERRORL(WriteTargetOutput(KTestNameNegative()));
1.617 + }
1.618 +
1.619 +