Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Side by Side Diff: tests/ClipBoundsTest.cpp

Issue 1971343002: Convert GrClip to an abstract base class (Closed) Base URL: https://skia.googlesource.com/skia.git@upload2_clipout
Patch Set: fix crash Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/image/SkImage_Gpu.cpp ('k') | tests/TessellatingPathRendererTests.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « src/image/SkImage_Gpu.cpp ('k') | tests/TessellatingPathRendererTests.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698