Chromium Code Reviews| Index: gm/gm.h |
| diff --git a/gm/gm.h b/gm/gm.h |
| index 3a651607414372639cea46cc6cb5472a08f4a0a7..239b219d4589380077ef8af8ee8b0cf71217b7ba 100644 |
| --- a/gm/gm.h |
| +++ b/gm/gm.h |
| @@ -11,6 +11,7 @@ |
| #include "SkBitmap.h" |
| #include "SkBitmapDevice.h" |
| #include "SkCanvas.h" |
| +#include "SkCommandLineFlags.h" |
| #include "SkPaint.h" |
| #include "SkSize.h" |
| #include "SkString.h" |
| @@ -20,6 +21,8 @@ |
| #include "GrContext.h" |
| #endif |
| +DECLARE_bool(forcePerspectiveMatrix); |
| + |
| #define DEF_GM(code) \ |
| static skiagm::GM* SK_MACRO_APPEND_LINE(F_)(void*) { code; } \ |
| static skiagm::GMRegistry SK_MACRO_APPEND_LINE(R_)(SK_MACRO_APPEND_LINE(F_)); |
| @@ -74,6 +77,13 @@ namespace skiagm { |
| // Most GMs will return the identity matrix, but some PDFs tests |
| // require setting the initial transform. |
| SkMatrix getInitialTransform() const { |
|
reed1
2013/09/23 18:48:40
I think we could generalize this guy a little for
edisonn
2013/09/23 19:38:04
Done.
|
| + if (FLAGS_forcePerspectiveMatrix) { |
| + SkMatrix perspective; |
| + perspective.setIdentity(); |
| + perspective.setPerspY(SkScalarDiv(SK_Scalar1, SkIntToScalar(1000))); |
| + perspective.setSkewX(SkScalarDiv(SkIntToScalar(8), SkIntToScalar(25))); |
| + return perspective; |
| + } |
| return this->onGetInitialTransform(); |
| } |