Index: include/gpu/GrTestUtils.h |
diff --git a/include/gpu/GrTestUtils.h b/include/gpu/GrTestUtils.h |
index e6bfa7476f99e075d1f435958812f62d6e3c278c..88063c6f3866d163c786a2ff14c08c4decde096b 100644 |
--- a/include/gpu/GrTestUtils.h |
+++ b/include/gpu/GrTestUtils.h |
@@ -8,16 +8,22 @@ |
#ifndef GrTestUtils_DEFINED |
#define GrTestUtils_DEFINED |
+#include "SkTypes.h" |
+ |
+#ifdef GR_TEST_UTILS |
+ |
#include "GrColor.h" |
#include "SkRandom.h" |
class SkMatrix; |
+struct SkRect; |
namespace GrTest { |
/** |
* A helper for use in Test functions. |
*/ |
const SkMatrix& TestMatrix(SkRandom*); |
+const SkRect& TestRect(SkRandom*); |
} |
@@ -46,13 +52,14 @@ static inline GrColor GrRandomColor(SkRandom* random) { |
random->nextULessThan(256), |
0xFF); |
break; |
- case kRandom_ColorMode: |
- uint8_t alpha = random->nextULessThan(256); |
- color = GrColorPackRGBA(random->nextRangeU(0, alpha), |
- random->nextRangeU(0, alpha), |
- random->nextRangeU(0, alpha), |
- alpha); |
+ case kRandom_ColorMode: { |
+ uint8_t alpha = random->nextULessThan(256); |
+ color = GrColorPackRGBA(random->nextRangeU(0, alpha), |
+ random->nextRangeU(0, alpha), |
+ random->nextRangeU(0, alpha), |
+ alpha); |
break; |
+ } |
} |
GrColorIsPMAssert(color); |
return color; |
@@ -82,3 +89,4 @@ static inline uint8_t GrRandomCoverage(SkRandom* random) { |
} |
#endif |
+#endif |