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 |
11 #include "GrClipMaskManager.h" | 11 #include "GrClipMaskManager.h" |
12 #include "GrContext.h" | 12 #include "GrContext.h" |
13 | 13 |
14 // Ensure that the 'getConservativeBounds' calls are returning bounds clamped | 14 // Ensure that the 'getConservativeBounds' calls are returning bounds clamped |
15 // to the render target | 15 // to the render target |
16 DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(GrClipBounds, reporter, ctxInfo) { | 16 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrClipBounds, reporter, ctxInfo) { |
17 static const int kXSize = 100; | 17 static const int kXSize = 100; |
18 static const int kYSize = 100; | 18 static const int kYSize = 100; |
19 | 19 |
20 GrSurfaceDesc desc; | 20 GrSurfaceDesc desc; |
21 desc.fFlags = kRenderTarget_GrSurfaceFlag; | 21 desc.fFlags = kRenderTarget_GrSurfaceFlag; |
22 desc.fConfig = kAlpha_8_GrPixelConfig; | 22 desc.fConfig = kAlpha_8_GrPixelConfig; |
23 desc.fWidth = kXSize; | 23 desc.fWidth = kXSize; |
24 desc.fHeight = kYSize; | 24 desc.fHeight = kYSize; |
25 | 25 |
26 SkAutoTUnref<GrTexture> texture( | 26 SkAutoTUnref<GrTexture> texture( |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 clipData.getConservativeBounds(texture->width(), texture->height(), | 59 clipData.getConservativeBounds(texture->width(), texture->height(), |
60 &devGrClipBound, | 60 &devGrClipBound, |
61 &isIntersectionOfRects); | 61 &isIntersectionOfRects); |
62 | 62 |
63 // make sure that GrClip is behaving itself | 63 // make sure that GrClip is behaving itself |
64 REPORTER_ASSERT(reporter, intScreen == devGrClipBound); | 64 REPORTER_ASSERT(reporter, intScreen == devGrClipBound); |
65 REPORTER_ASSERT(reporter, isIntersectionOfRects); | 65 REPORTER_ASSERT(reporter, isIntersectionOfRects); |
66 } | 66 } |
67 | 67 |
68 #endif | 68 #endif |
OLD | NEW |