| Index: gm/imagefilterscropexpand.cpp
|
| diff --git a/gm/imagefilterscropexpand.cpp b/gm/imagefilterscropexpand.cpp
|
| index 4fa9b0084e96e7a5a3b7702b647bc1a4f09588bd..5c3dfc598fef21eef04a6a9fb42690d0084648a6 100644
|
| --- a/gm/imagefilterscropexpand.cpp
|
| +++ b/gm/imagefilterscropexpand.cpp
|
| @@ -19,8 +19,10 @@
|
| #include "SkImageSource.h"
|
| #include "SkMorphologyImageFilter.h"
|
| #include "SkColorFilterImageFilter.h"
|
| +#include "SkLightingImageFilter.h"
|
| #include "SkMergeImageFilter.h"
|
| #include "SkOffsetImageFilter.h"
|
| +#include "SkPoint3.h"
|
| #include "SkSurface.h"
|
|
|
| ///////////////////////////////////////////////////////////////////////////////
|
| @@ -35,7 +37,7 @@ protected:
|
| return SkString("imagefilterscropexpand");
|
| }
|
|
|
| - SkISize onISize() override { return SkISize::Make(650, 650); }
|
| + SkISize onISize() override { return SkISize::Make(730, 650); }
|
|
|
| void onDraw(SkCanvas* canvas) override {
|
| SkAutoTUnref<SkColorFilter> cf(
|
| @@ -62,6 +64,9 @@ protected:
|
| SkRect r = SkRect::MakeWH(SkIntToScalar(64), SkIntToScalar(64));
|
| SkScalar MARGIN = SkIntToScalar(12);
|
|
|
| + SkPoint3 pointLocation = SkPoint3::Make(0, 0, SkIntToScalar(10));
|
| + SkScalar kd = SkIntToScalar(2);
|
| + SkScalar surfaceScale = SkIntToScalar(1);
|
| SkIRect bounds;
|
| r.roundOut(&bounds);
|
|
|
| @@ -105,6 +110,10 @@ protected:
|
| Draw(canvas, checkerboard, rect, SkOffsetImageFilter::Create(
|
| SkIntToScalar(-8), SkIntToScalar(16), noopCropped.get(), &big_rect));
|
|
|
| + Draw(canvas, checkerboard, rect,
|
| + SkLightingImageFilter::CreatePointLitDiffuse(pointLocation, SK_ColorWHITE,
|
| + surfaceScale, kd, noopCropped.get(), &big_rect));
|
| +
|
| canvas->restore();
|
| canvas->translate(0, SkIntToScalar(80));
|
| }
|
|
|