| 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 | 8 |
| 9 #include "Test.h" | 9 #include "Test.h" |
| 10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 #else | 338 #else |
| 339 continue; | 339 continue; |
| 340 #endif | 340 #endif |
| 341 } | 341 } |
| 342 SkCanvas canvas(device); | 342 SkCanvas canvas(device); |
| 343 fillCanvas(&canvas); | 343 fillCanvas(&canvas); |
| 344 | 344 |
| 345 static const SkCanvas::Config8888 gReadConfigs[] = { | 345 static const SkCanvas::Config8888 gReadConfigs[] = { |
| 346 SkCanvas::kNative_Premul_Config8888, | 346 SkCanvas::kNative_Premul_Config8888, |
| 347 SkCanvas::kNative_Unpremul_Config8888, | 347 SkCanvas::kNative_Unpremul_Config8888, |
| 348 /** | 348 |
| 349 * There is a bug in Ganesh (http://code.google.com/p/skia/issues/detail?id=4
38) | |
| 350 * that causes the readback of pixels from BGRA canvas to an RGBA bitmap to | |
| 351 * fail. This should be removed as soon as the issue above is resolved. | |
| 352 */ | |
| 353 #if !defined(SK_BUILD_FOR_ANDROID) | |
| 354 SkCanvas::kBGRA_Premul_Config8888, | 349 SkCanvas::kBGRA_Premul_Config8888, |
| 355 SkCanvas::kBGRA_Unpremul_Config8888, | 350 SkCanvas::kBGRA_Unpremul_Config8888, |
| 356 #endif | 351 |
| 357 SkCanvas::kRGBA_Premul_Config8888, | 352 SkCanvas::kRGBA_Premul_Config8888, |
| 358 SkCanvas::kRGBA_Unpremul_Config8888, | 353 SkCanvas::kRGBA_Unpremul_Config8888, |
| 359 }; | 354 }; |
| 360 for (size_t rect = 0; rect < SK_ARRAY_COUNT(testRects); ++rect) { | 355 for (size_t rect = 0; rect < SK_ARRAY_COUNT(testRects); ++rect) { |
| 361 const SkIRect& srcRect = testRects[rect]; | 356 const SkIRect& srcRect = testRects[rect]; |
| 362 for (BitmapInit bmi = kFirstBitmapInit; | 357 for (BitmapInit bmi = kFirstBitmapInit; |
| 363 bmi < kBitmapInitCnt; | 358 bmi < kBitmapInitCnt; |
| 364 bmi = nextBMI(bmi)) { | 359 bmi = nextBMI(bmi)) { |
| 365 for (size_t c = 0; c < SK_ARRAY_COUNT(gReadConfigs); ++c) { | 360 for (size_t c = 0; c < SK_ARRAY_COUNT(gReadConfigs); ++c) { |
| 366 SkCanvas::Config8888 config8888 = gReadConfigs[c]; | 361 SkCanvas::Config8888 config8888 = gReadConfigs[c]; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 } | 406 } |
| 412 } | 407 } |
| 413 } | 408 } |
| 414 } | 409 } |
| 415 } | 410 } |
| 416 } | 411 } |
| 417 } | 412 } |
| 418 | 413 |
| 419 #include "TestClassDef.h" | 414 #include "TestClassDef.h" |
| 420 DEFINE_GPUTESTCLASS("ReadPixels", ReadPixelsTestClass, ReadPixelsTest) | 415 DEFINE_GPUTESTCLASS("ReadPixels", ReadPixelsTestClass, ReadPixelsTest) |
| OLD | NEW |