Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: tests/BitmapCopyTest.cpp

Issue 116543009: Revert "begin to remove SkLONGLONG and wean Skia off of Sk64" (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/core/SkMath.cpp ('k') | tests/MathTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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() != 0x2386F26FC10000LL) { 361 if (safeSize.fHi != 0x2386F2 ||
362 safeSize.fLo != 0x6FC10000)
362 sizeFail = true; 363 sizeFail = true;
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() != 0x470DE4DF820000LL) { 368 if (safeSize.fHi != 0x470DE4 ||
369 safeSize.fLo != 0xDF820000)
369 sizeFail = true; 370 sizeFail = true;
370 }
371 break; 371 break;
372 372
373 case SkBitmap::kARGB_8888_Config: 373 case SkBitmap::kARGB_8888_Config:
374 if (safeSize.as64() != 0x8E1BC9BF040000LL) { 374 if (safeSize.fHi != 0x8E1BC9 ||
375 safeSize.fLo != 0xBF040000)
375 sizeFail = true; 376 sizeFail = true;
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",
385 getSkConfigName(tstSafeSize)); 385 getSkConfigName(tstSafeSize));
386 reporter->reportFailed(str); 386 reporter->reportFailed(str);
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « src/core/SkMath.cpp ('k') | tests/MathTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698