| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkCanvas.h" | 8 #include "SkCanvas.h" |
| 9 #include "SkColorPriv.h" | 9 #include "SkColorPriv.h" |
| 10 #include "SkMathPriv.h" | 10 #include "SkMathPriv.h" |
| 11 #include "SkRegion.h" | 11 #include "SkRegion.h" |
| 12 #include "SkSurface.h" | 12 #include "SkSurface.h" |
| 13 #include "Test.h" | 13 #include "Test.h" |
| 14 | 14 |
| 15 #if SK_SUPPORT_GPU | 15 #if SK_SUPPORT_GPU |
| 16 #include "GrContext.h" | 16 #include "GrContext.h" |
| 17 #include "SkGr.h" | 17 #include "SkGr.h" |
| 18 #include "SkGrPriv.h" |
| 18 #endif | 19 #endif |
| 19 | 20 |
| 20 #include <initializer_list> | 21 #include <initializer_list> |
| 21 | 22 |
| 22 static const int DEV_W = 100, DEV_H = 100; | 23 static const int DEV_W = 100, DEV_H = 100; |
| 23 static const SkIRect DEV_RECT = SkIRect::MakeWH(DEV_W, DEV_H); | 24 static const SkIRect DEV_RECT = SkIRect::MakeWH(DEV_W, DEV_H); |
| 24 static const SkRect DEV_RECT_S = SkRect::MakeWH(DEV_W * SK_Scalar1, | 25 static const SkRect DEV_RECT_S = SkRect::MakeWH(DEV_W * SK_Scalar1, |
| 25 DEV_H * SK_Scalar1); | 26 DEV_H * SK_Scalar1); |
| 26 | 27 |
| 27 static SkPMColor get_src_color(int x, int y) { | 28 static SkPMColor get_src_color(int x, int y) { |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 SkAutoTUnref<SkData> dataB(draw_into_surface(surfB.get(), tx_subset, qua
lity)); | 621 SkAutoTUnref<SkData> dataB(draw_into_surface(surfB.get(), tx_subset, qua
lity)); |
| 621 | 622 |
| 622 REPORTER_ASSERT(reporter, dataA->equals(dataB)); | 623 REPORTER_ASSERT(reporter, dataA->equals(dataB)); |
| 623 if (false) { | 624 if (false) { |
| 624 dump_to_file("test_image_A.png", dataA); | 625 dump_to_file("test_image_A.png", dataA); |
| 625 dump_to_file("test_image_B.png", dataB); | 626 dump_to_file("test_image_B.png", dataB); |
| 626 } | 627 } |
| 627 } | 628 } |
| 628 } | 629 } |
| 629 #endif | 630 #endif |
| OLD | NEW |