aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/filterfastbounds.cpp
diff options
context:
space:
mode:
authorGravatar senorblanco <senorblanco@chromium.org>2015-12-07 10:36:30 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-12-07 10:36:30 -0800
commitd18b1b5adc15afd9b57ddecf779dccbcc85098f1 (patch)
tree3820632d5202a6dd24d8134fde524decabea3a04 /gm/filterfastbounds.cpp
parent8e03b8af752638ee7375460f03aebd554360486f (diff)
Add SkTileImageFilter sample to filterfastbounds GM.
NOTE: will affect pixel results for filterfastbounds GM. BUG=skia:3194 Review URL: https://codereview.chromium.org/1500373004
Diffstat (limited to 'gm/filterfastbounds.cpp')
-rw-r--r--gm/filterfastbounds.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/gm/filterfastbounds.cpp b/gm/filterfastbounds.cpp
index d484c4211c..453dded8cc 100644
--- a/gm/filterfastbounds.cpp
+++ b/gm/filterfastbounds.cpp
@@ -14,6 +14,7 @@
#include "SkPictureRecorder.h"
#include "SkRandom.h"
#include "SkSurface.h"
+#include "SkTileImageFilter.h"
namespace skiagm {
@@ -110,6 +111,15 @@ static void create_paints(SkImageFilter* source, SkTArray<SkPaint>* paints) {
}
{
+ SkRect src = SkRect::MakeXYWH(20, 20, 10, 10);
+ SkRect dst = SkRect::MakeXYWH(30, 30, 30, 30);
+ SkAutoTUnref<SkImageFilter> tileIF(
+ SkTileImageFilter::Create(src, dst, nullptr));
+
+ add_paint(tileIF, paints);
+ }
+
+ {
static const SkDropShadowImageFilter::ShadowMode kBoth =
SkDropShadowImageFilter::kDrawShadowAndForeground_ShadowMode;
@@ -157,7 +167,7 @@ public:
protected:
static const int kTileWidth = 100;
static const int kTileHeight = 100;
- static const int kNumVertTiles = 6;
+ static const int kNumVertTiles = 7;
static const int kNumXtraCols = 2;
SkString onShortName() override{ return SkString("filterfastbounds"); }