aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/CanvasStateTest.cpp
diff options
context:
space:
mode:
authorGravatar scroggo <scroggo@google.com>2014-07-09 07:26:40 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-07-09 07:26:40 -0700
commitecce60bad6e3b7a72e1eba820bc3be15d39a1c21 (patch)
treeb2110440aa0d9d34fa0e77c6a5dece958a161e8e /tests/CanvasStateTest.cpp
parenta9309f5e5b188bd2d323e115e6b343772ba231aa (diff)
Build Android with SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG.
This flag will be used on Android when built for the framework, as well as when built for the WebView. Setting this flag for Android means our tests can fully test CanvasStateTest. Fix CanvasStateTest. It has bit-rotted since disabling SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG. Splitting off from https://codereview.chromium.org/372003002/ , as it seems self-contained. BUG=b/15693384 R=djsollen@google.com, reed@google.com, mtklein@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/375943003
Diffstat (limited to 'tests/CanvasStateTest.cpp')
-rw-r--r--tests/CanvasStateTest.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/CanvasStateTest.cpp b/tests/CanvasStateTest.cpp
index 98a0b0ed92..eb84c11c7d 100644
--- a/tests/CanvasStateTest.cpp
+++ b/tests/CanvasStateTest.cpp
@@ -27,7 +27,6 @@ static void test_complex_layers(skiatest::Reporter* reporter) {
const SkColorType colorTypes[] = {
kRGB_565_SkColorType, kN32_SkColorType
};
- const int configCount = sizeof(colorTypes) / sizeof(SkBitmap::Config);
const int layerAlpha[] = { 255, 255, 0 };
const SkCanvas::SaveFlags flags[] = { SkCanvas::kARGB_NoClipLayer_SaveFlag,
@@ -37,7 +36,7 @@ static void test_complex_layers(skiatest::Reporter* reporter) {
REPORTER_ASSERT(reporter, sizeof(layerAlpha) == sizeof(flags));
const int layerCombinations = sizeof(layerAlpha) / sizeof(int);
- for (int i = 0; i < configCount; ++i) {
+ for (size_t i = 0; i < SK_ARRAY_COUNT(colorTypes); ++i) {
SkBitmap bitmaps[2];
for (int j = 0; j < 2; ++j) {
bitmaps[j].allocPixels(SkImageInfo::Make(WIDTH, HEIGHT,