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 "SkBitmap.h" | 9 #include "SkBitmap.h" |
10 #include "SkRect.h" | 10 #include "SkRect.h" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
219 | 219 |
220 // Writes unique pixel values at locations specified by coords. | 220 // Writes unique pixel values at locations specified by coords. |
221 static void writeCoordPixels(SkBitmap& bm, const Coordinates& coords) { | 221 static void writeCoordPixels(SkBitmap& bm, const Coordinates& coords) { |
222 for (int i = 0; i < coords.length; ++i) | 222 for (int i = 0; i < coords.length; ++i) |
223 setPixel(coords[i]->fX, coords[i]->fY, i, bm); | 223 setPixel(coords[i]->fX, coords[i]->fY, i, bm); |
224 } | 224 } |
225 | 225 |
226 static void TestBitmapCopy(skiatest::Reporter* reporter) { | 226 static void TestBitmapCopy(skiatest::Reporter* reporter) { |
227 static const Pair gPairs[] = { | 227 static const Pair gPairs[] = { |
228 { SkBitmap::kNo_Config, "00000000" }, | 228 { SkBitmap::kNo_Config, "00000000" }, |
229 { SkBitmap::kA1_Config, "01000000" }, | 229 { SkBitmap::kA1_Config, "00000000" }, |
scroggo
2013/11/20 21:04:28
Seems like part of a separate change.
reed1
2013/11/20 21:27:18
Needed since w/ this change, A1 is no longer suppo
| |
230 { SkBitmap::kA8_Config, "00101010" }, | 230 { SkBitmap::kA8_Config, "00101010" }, |
231 { SkBitmap::kIndex8_Config, "00111010" }, | 231 { SkBitmap::kIndex8_Config, "00111010" }, |
232 { SkBitmap::kRGB_565_Config, "00101010" }, | 232 { SkBitmap::kRGB_565_Config, "00101010" }, |
233 { SkBitmap::kARGB_4444_Config, "00101110" }, | 233 { SkBitmap::kARGB_4444_Config, "00101110" }, |
234 { SkBitmap::kARGB_8888_Config, "00101110" }, | 234 { SkBitmap::kARGB_8888_Config, "00101110" }, |
235 }; | 235 }; |
236 | 236 |
237 static const bool isExtracted[] = { | 237 static const bool isExtracted[] = { |
238 false, true | 238 false, true |
239 }; | 239 }; |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
590 false); | 590 false); |
591 | 591 |
592 #endif | 592 #endif |
593 } | 593 } |
594 } // for (size_t copyCase ... | 594 } // for (size_t copyCase ... |
595 } | 595 } |
596 } | 596 } |
597 | 597 |
598 #include "TestClassDef.h" | 598 #include "TestClassDef.h" |
599 DEFINE_TESTCLASS("BitmapCopy", TestBitmapCopyClass, TestBitmapCopy) | 599 DEFINE_TESTCLASS("BitmapCopy", TestBitmapCopyClass, TestBitmapCopy) |
OLD | NEW |