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 "SkBitmapDevice.h" | 8 #include "SkBitmapDevice.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
11 #include "SkMathPriv.h" | 11 #include "SkMathPriv.h" |
12 #include "SkRegion.h" | 12 #include "SkRegion.h" |
13 #include "Test.h" | 13 #include "Test.h" |
14 | 14 |
15 #if SK_SUPPORT_GPU | 15 #if SK_SUPPORT_GPU |
| 16 #include "GrContextFactory.h" |
16 #include "SkGpuDevice.h" | 17 #include "SkGpuDevice.h" |
17 #include "GrContextFactory.h" | |
18 #else | 18 #else |
19 class GrContext; | 19 class GrContext; |
20 class GrContextFactory; | 20 class GrContextFactory; |
21 #endif | 21 #endif |
22 | 22 |
23 static const int DEV_W = 100, DEV_H = 100; | 23 static const int DEV_W = 100, DEV_H = 100; |
24 static const SkIRect DEV_RECT = SkIRect::MakeWH(DEV_W, DEV_H); | 24 static const SkIRect DEV_RECT = SkIRect::MakeWH(DEV_W, DEV_H); |
25 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, |
26 DEV_H * SK_Scalar1); | 26 DEV_H * SK_Scalar1); |
27 static const U8CPU DEV_PAD = 0xee; | 27 static const U8CPU DEV_PAD = 0xee; |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 SkIRect writeRect = SkIRect::MakeXYWH(rect.fLeft, rect.f
Top, | 463 SkIRect writeRect = SkIRect::MakeXYWH(rect.fLeft, rect.f
Top, |
464 bmp.width(), bmp.h
eight()); | 464 bmp.width(), bmp.h
eight()); |
465 bool intersects = SkIRect::Intersects(canvasRect, writeR
ect) ; | 465 bool intersects = SkIRect::Intersects(canvasRect, writeR
ect) ; |
466 REPORTER_ASSERT(reporter, intersects == (idBefore != idA
fter)); | 466 REPORTER_ASSERT(reporter, intersects == (idBefore != idA
fter)); |
467 } | 467 } |
468 } | 468 } |
469 } | 469 } |
470 } | 470 } |
471 } | 471 } |
472 } | 472 } |
OLD | NEW |