| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "Test.h" | 8 #include "Test.h" |
| 9 // This is a GR test | 9 // This is a GR test |
| 10 #if SK_SUPPORT_GPU | 10 #if SK_SUPPORT_GPU |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 stack.getConservativeBounds(0, 0, kXSize, kYSize, | 34 stack.getConservativeBounds(0, 0, kXSize, kYSize, |
| 35 &devStackBounds, | 35 &devStackBounds, |
| 36 &isIntersectionOfRects); | 36 &isIntersectionOfRects); |
| 37 | 37 |
| 38 // make sure that the SkClipStack is behaving itself | 38 // make sure that the SkClipStack is behaving itself |
| 39 REPORTER_ASSERT(reporter, screen == devStackBounds); | 39 REPORTER_ASSERT(reporter, screen == devStackBounds); |
| 40 REPORTER_ASSERT(reporter, isIntersectionOfRects); | 40 REPORTER_ASSERT(reporter, isIntersectionOfRects); |
| 41 | 41 |
| 42 // wrap the SkClipStack in a GrClip | 42 // wrap the SkClipStack in a GrClip |
| 43 GrClip clipData; | 43 GrClipStackClip clipData(&stack); |
| 44 clipData.setClipStack(&stack); | |
| 45 | 44 |
| 46 SkIRect devGrClipBound; | 45 SkIRect devGrClipBound; |
| 47 clipData.getConservativeBounds(kXSize, kYSize, | 46 clipData.getConservativeBounds(kXSize, kYSize, |
| 48 &devGrClipBound, | 47 &devGrClipBound, |
| 49 &isIntersectionOfRects); | 48 &isIntersectionOfRects); |
| 50 | 49 |
| 51 // make sure that GrClip is behaving itself | 50 // make sure that GrClip is behaving itself |
| 52 REPORTER_ASSERT(reporter, intScreen == devGrClipBound); | 51 REPORTER_ASSERT(reporter, intScreen == devGrClipBound); |
| 53 REPORTER_ASSERT(reporter, isIntersectionOfRects); | 52 REPORTER_ASSERT(reporter, isIntersectionOfRects); |
| 54 } | 53 } |
| 55 | 54 |
| 56 #endif | 55 #endif |
| OLD | NEW |