[PDF] Add GM and infrastructure to test drawing shaders with an initial transform.
Previous review at https://codereview.appspot.com/5867047/ and https://codereview.appspot.com/5849045/
TBR=reed@google.com
Review URL: https://codereview.appspot.com/5860044
git-svn-id: http://skia.googlecode.com/svn/trunk@3452 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gm/gm.h b/gm/gm.h
index d75a1c1..bec29bf 100644
--- a/gm/gm.h
+++ b/gm/gm.h
@@ -45,7 +45,15 @@
uint32_t getFlags() const {
return this->onGetFlags();
}
-
+
+ // TODO(vandebo) Instead of exposing this, we should run all the GMs
+ // with and without an initial transform.
+ // Most GMs will return the identity matrix, but some PDFs tests
+ // require setting the initial transform.
+ SkMatrix getInitialTransform() const {
+ return this->onGetInitialTransform();
+ }
+
SkColor getBGColor() const { return fBGColor; }
void setBGColor(SkColor);
@@ -65,7 +73,8 @@
virtual SkISize onISize() = 0;
virtual SkString onShortName() = 0;
virtual uint32_t onGetFlags() const { return 0; }
-
+ virtual SkMatrix onGetInitialTransform() const { return SkMatrix::I(); }
+
private:
SkString fShortName;
SkColor fBGColor;