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
diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi
index cc3aae4..0e4fca2 100644
--- a/gyp/common_conditions.gypi
+++ b/gyp/common_conditions.gypi
@@ -368,8 +368,6 @@
         'SK_DEFAULT_FONT_CACHE_LIMIT   (768 * 1024)',
         'SK_ATOMICS_PLATFORM_H "../../src/ports/SkAtomics_sync.h"',
         'SK_MUTEX_PLATFORM_H "../../src/ports/SkMutex_pthread.h"',
-        # Needed until we fix skbug.com/2440.
-        'SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG',
         # Transitional, for deprecated SkCanvas::SaveFlags methods.
         'SK_ATTR_DEPRECATED=SK_NOTHING_ARG1',
         'SK_SUPPORT_LEGACY_SHADER_LOCALMATRIX',
@@ -669,6 +667,8 @@
             'defines': [
               'SKIA_DLL',
               'SKIA_IMPLEMENTATION=1',
+              # Needed until we fix skbug.com/2440.
+              'SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG',
             ],
           }],
           [ 'skia_profile_enabled == 1', {
diff --git a/tests/CanvasStateTest.cpp b/tests/CanvasStateTest.cpp
index 98a0b0e..eb84c11 100644
--- a/tests/CanvasStateTest.cpp
+++ b/tests/CanvasStateTest.cpp
@@ -27,7 +27,6 @@
     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 @@
     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,