Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: gm/imagefiltersclipped.cpp

Issue 1310053004: Fix clipped lighting image filters. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/effects/SkLightingImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/imagefiltersclipped.cpp
diff --git a/gm/imagefiltersclipped.cpp b/gm/imagefiltersclipped.cpp
index 28f3e0bde97a2d0d26959b952d7bf9966bd43e55..a641ca34730f83fb3a22848c80a51abca6abbe09 100644
--- a/gm/imagefiltersclipped.cpp
+++ b/gm/imagefiltersclipped.cpp
@@ -12,9 +12,11 @@
#include "SkDisplacementMapEffect.h"
#include "SkDropShadowImageFilter.h"
#include "SkGradientShader.h"
+#include "SkLightingImageFilter.h"
#include "SkMorphologyImageFilter.h"
#include "SkOffsetImageFilter.h"
#include "SkPerlinNoiseShader.h"
+#include "SkPoint3.h"
#include "SkRectShaderImageFilter.h"
#include "SkScalar.h"
#include "gm.h"
@@ -95,6 +97,7 @@ protected:
SkDoubleToScalar(0.1), SkDoubleToScalar(0.05), 1, 0));
SkMatrix resizeMatrix;
resizeMatrix.setScale(RESIZE_FACTOR_X, RESIZE_FACTOR_Y);
+ SkPoint3 pointLocation = SkPoint3::Make(32, 32, SkIntToScalar(10));
SkImageFilter* filters[] = {
SkBlurImageFilter::Create(SkIntToScalar(12), SkIntToScalar(12)),
@@ -110,6 +113,8 @@ protected:
SkErodeImageFilter::Create(2, 2, checkerboard.get()),
SkOffsetImageFilter::Create(SkIntToScalar(-16), SkIntToScalar(32)),
SkImageFilter::CreateMatrixFilter(resizeMatrix, kNone_SkFilterQuality),
+ SkLightingImageFilter::CreatePointLitDiffuse(pointLocation, SK_ColorWHITE, SK_Scalar1, SkIntToScalar(2), checkerboard.get()),
+
};
SkRect r = SkRect::MakeWH(SkIntToScalar(64), SkIntToScalar(64));
« no previous file with comments | « no previous file | src/effects/SkLightingImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698