| OLD | NEW | 
|    1  |    1  | 
|    2 /* |    2 /* | 
|    3  * Copyright 2011 Google Inc. |    3  * Copyright 2011 Google Inc. | 
|    4  * |    4  * | 
|    5  * Use of this source code is governed by a BSD-style license that can be |    5  * Use of this source code is governed by a BSD-style license that can be | 
|    6  * found in the LICENSE file. |    6  * found in the LICENSE file. | 
|    7  */ |    7  */ | 
|    8 #include "gm.h" |    8 #include "gm.h" | 
|    9 #include "SkCanvas.h" |    9 #include "SkCanvas.h" | 
|   10 #include "SkPaint.h" |   10 #include "SkPaint.h" | 
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   66         sk_tool_utils::set_portable_typeface(&titlePaint); |   66         sk_tool_utils::set_portable_typeface(&titlePaint); | 
|   67         titlePaint.setLCDRenderText(true); |   67         titlePaint.setLCDRenderText(true); | 
|   68         titlePaint.setTextSize(15 * SK_Scalar1); |   68         titlePaint.setTextSize(15 * SK_Scalar1); | 
|   69         const char title[] = "Empty Paths Drawn Into Rectangle Clips With " |   69         const char title[] = "Empty Paths Drawn Into Rectangle Clips With " | 
|   70                              "Indicated Style and Fill"; |   70                              "Indicated Style and Fill"; | 
|   71         canvas->drawText(title, strlen(title), |   71         canvas->drawText(title, strlen(title), | 
|   72                             20 * SK_Scalar1, |   72                             20 * SK_Scalar1, | 
|   73                             20 * SK_Scalar1, |   73                             20 * SK_Scalar1, | 
|   74                             titlePaint); |   74                             titlePaint); | 
|   75  |   75  | 
|   76         SkLCGRandom rand; |   76         SkRandom rand; | 
|   77         SkRect rect = SkRect::MakeWH(100*SK_Scalar1, 30*SK_Scalar1); |   77         SkRect rect = SkRect::MakeWH(100*SK_Scalar1, 30*SK_Scalar1); | 
|   78         int i = 0; |   78         int i = 0; | 
|   79         canvas->save(); |   79         canvas->save(); | 
|   80         canvas->translate(10 * SK_Scalar1, 0); |   80         canvas->translate(10 * SK_Scalar1, 0); | 
|   81         canvas->save(); |   81         canvas->save(); | 
|   82         for (size_t style = 0; style < SK_ARRAY_COUNT(gStyles); ++style) { |   82         for (size_t style = 0; style < SK_ARRAY_COUNT(gStyles); ++style) { | 
|   83             for (size_t fill = 0; fill < SK_ARRAY_COUNT(gFills); ++fill) { |   83             for (size_t fill = 0; fill < SK_ARRAY_COUNT(gFills); ++fill) { | 
|   84                 if (0 == i % 4) { |   84                 if (0 == i % 4) { | 
|   85                     canvas->restore(); |   85                     canvas->restore(); | 
|   86                     canvas->translate(0, rect.height() + 40 * SK_Scalar1); |   86                     canvas->translate(0, rect.height() + 40 * SK_Scalar1); | 
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  126 private: |  126 private: | 
|  127     typedef GM INHERITED; |  127     typedef GM INHERITED; | 
|  128 }; |  128 }; | 
|  129  |  129  | 
|  130 ////////////////////////////////////////////////////////////////////////////// |  130 ////////////////////////////////////////////////////////////////////////////// | 
|  131  |  131  | 
|  132 static GM* MyFactory(void*) { return new EmptyPathGM; } |  132 static GM* MyFactory(void*) { return new EmptyPathGM; } | 
|  133 static GMRegistry reg(MyFactory); |  133 static GMRegistry reg(MyFactory); | 
|  134  |  134  | 
|  135 } |  135 } | 
| OLD | NEW |