OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #include "Test.h" | 8 #include "Test.h" |
9 #include "TestClassDef.h" | 9 #include "TestClassDef.h" |
10 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 reporter->reportFailed(str); | 351 reporter->reportFailed(str); |
352 } | 352 } |
353 bool sizeFail = false; | 353 bool sizeFail = false; |
354 // Compare against hand-computed values. | 354 // Compare against hand-computed values. |
355 switch (gPairs[i].fConfig) { | 355 switch (gPairs[i].fConfig) { |
356 case SkBitmap::kNo_Config: | 356 case SkBitmap::kNo_Config: |
357 break; | 357 break; |
358 | 358 |
359 case SkBitmap::kA8_Config: | 359 case SkBitmap::kA8_Config: |
360 case SkBitmap::kIndex8_Config: | 360 case SkBitmap::kIndex8_Config: |
361 if (safeSize.as64() != 0x2386F26FC10000) { | 361 if (safeSize.as64() != 0x2386F26FC10000LL) { |
362 sizeFail = true; | 362 sizeFail = true; |
363 } | 363 } |
364 break; | 364 break; |
365 | 365 |
366 case SkBitmap::kRGB_565_Config: | 366 case SkBitmap::kRGB_565_Config: |
367 case SkBitmap::kARGB_4444_Config: | 367 case SkBitmap::kARGB_4444_Config: |
368 if (safeSize.as64() != 0x470DE4DF820000) { | 368 if (safeSize.as64() != 0x470DE4DF820000LL) { |
369 sizeFail = true; | 369 sizeFail = true; |
370 } | 370 } |
371 break; | 371 break; |
372 | 372 |
373 case SkBitmap::kARGB_8888_Config: | 373 case SkBitmap::kARGB_8888_Config: |
374 if (safeSize.as64() != 0x8E1BC9BF040000) { | 374 if (safeSize.as64() != 0x8E1BC9BF040000LL) { |
375 sizeFail = true; | 375 sizeFail = true; |
376 } | 376 } |
377 break; | 377 break; |
378 | 378 |
379 default: | 379 default: |
380 break; | 380 break; |
381 } | 381 } |
382 if (sizeFail) { | 382 if (sizeFail) { |
383 SkString str; | 383 SkString str; |
384 str.printf("getSafeSize64() wrong size: %s", | 384 str.printf("getSafeSize64() wrong size: %s", |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 // for the transfer. | 544 // for the transfer. |
545 REPORTER_ASSERT(reporter, | 545 REPORTER_ASSERT(reporter, |
546 subset.copyPixelsFrom(buf, 1, subset.rowBytes()) == | 546 subset.copyPixelsFrom(buf, 1, subset.rowBytes()) == |
547 false); | 547 false); |
548 | 548 |
549 #endif | 549 #endif |
550 } | 550 } |
551 } // for (size_t copyCase ... | 551 } // for (size_t copyCase ... |
552 } | 552 } |
553 } | 553 } |
OLD | NEW |