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

Unified Diff: tests/ClipStackTest.cpp

Issue 56103002: fix mac 10.6 build (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ClipStackTest.cpp
diff --git a/tests/ClipStackTest.cpp b/tests/ClipStackTest.cpp
index 5f85e6a83e8f32e6ac20343462b801f85a7a83d1..3161674a77c1e515ed052118ca4ecdfb7599f092 100644
--- a/tests/ClipStackTest.cpp
+++ b/tests/ClipStackTest.cpp
@@ -1006,7 +1006,7 @@ static void test_reduced_clip_stack_genid(skiatest::Reporter* reporter) {
{
SkClipStack stack;
stack.clipDevRect(SkRect::MakeXYWH(0, 0, 100, 100), SkRegion::kReplace_Op, true);
- stack.clipDevRect(SkRect::MakeXYWH(0, 0, 50.3, 50.3), SkRegion::kReplace_Op, true);
+ stack.clipDevRect(SkRect::MakeXYWH(0, 0, 50.3f, 50.3f), SkRegion::kReplace_Op, true);
SkIRect inflatedIBounds = SkIRect::MakeXYWH(0, 0, 100, 100);
GrReducedClip::ElementList reducedClips;
@@ -1032,39 +1032,37 @@ static void test_reduced_clip_stack_genid(skiatest::Reporter* reporter) {
// A B
// C D
- stack.clipDevRect(SkRect::MakeXYWH(0, 0, 25.3, 25.3), SkRegion::kReplace_Op, true);
+ stack.clipDevRect(SkRect::MakeXYWH(0, 0, 25.3f, 25.3f), SkRegion::kReplace_Op, true);
int32_t genIDA = stack.getTopmostGenID();
- stack.clipDevRect(SkRect::MakeXYWH(50, 0, 25.3, 25.3), SkRegion::kUnion_Op, true);
+ stack.clipDevRect(SkRect::MakeXYWH(50, 0, 25.3f, 25.3f), SkRegion::kUnion_Op, true);
int32_t genIDB = stack.getTopmostGenID();
- stack.clipDevRect(SkRect::MakeXYWH(0, 50, 25.3, 25.3), SkRegion::kUnion_Op, true);
+ stack.clipDevRect(SkRect::MakeXYWH(0, 50, 25.3f, 25.3f), SkRegion::kUnion_Op, true);
int32_t genIDC = stack.getTopmostGenID();
- stack.clipDevRect(SkRect::MakeXYWH(50, 50, 25.3, 25.3), SkRegion::kUnion_Op, true);
+ stack.clipDevRect(SkRect::MakeXYWH(50, 50, 25.3f, 25.3f), SkRegion::kUnion_Op, true);
int32_t genIDD = stack.getTopmostGenID();
+#define XYWH SkIRect::MakeXYWH
+
+ SkIRect unused;
+ unused.setEmpty();
+ SkIRect stackBounds = XYWH(0, 0, 76, 76);
+
// The base test is to test each rect in two ways:
// 1) The box dimensions. (Should reduce to "all in", no elements).
// 2) A bit over the box dimensions.
// In the case 2, test that the generation id is what is expected.
// The rects are of fractional size so that case 2 never gets optimized to an empty element
// list.
-
+
// Not passing in tighter bounds is tested for consistency.
- struct GenIDTestCase {
+ struct {
SkIRect testBounds;
int reducedClipCount;
int32_t reducedGenID;
GrReducedClip::InitialState initialState;
SkIRect tighterBounds; // If this is empty, the query will not pass tighter bounds
- // parameter.
- };
-
-#define XYWH SkIRect::MakeXYWH
-
- SkIRect unused;
- unused.setEmpty();
- SkIRect stackBounds = XYWH(0, 0, 76, 76);
-
- GenIDTestCase testCases[] = {
+ // parameter.
+ } testCases[] = {
// Rect A.
{ XYWH(0, 0, 25, 25), 0, SkClipStack::kWideOpenGenID, GrReducedClip::kAllIn_InitialState, XYWH(0, 0, 25, 25) },
{ XYWH(0, 0, 25, 25), 0, SkClipStack::kWideOpenGenID, GrReducedClip::kAllIn_InitialState, unused },
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698