Add new SkPoint3 class
The existing Light filter and the upcoming Lighting Shader both need a Point3 class
Review URL: https://codereview.chromium.org/1229693009
diff --git a/samplecode/SampleFilterFuzz.cpp b/samplecode/SampleFilterFuzz.cpp
index 30389b6..bae7c21 100644
--- a/samplecode/SampleFilterFuzz.cpp
+++ b/samplecode/SampleFilterFuzz.cpp
@@ -26,6 +26,7 @@
#include "SkPerlinNoiseShader.h"
#include "SkPictureImageFilter.h"
#include "SkPictureRecorder.h"
+#include "SkPoint3.h"
#include "SkRandom.h"
#include "SkRectShaderImageFilter.h"
#include "SkTestImageFilters.h"
@@ -128,7 +129,7 @@
}
static SkPoint3 make_point() {
- return SkPoint3(make_scalar(), make_scalar(), make_scalar(true));
+ return SkPoint3::Make(make_scalar(), make_scalar(), make_scalar(true));
}
static SkDisplacementMapEffect::ChannelSelectorType make_channel_selector_type() {
@@ -357,10 +358,10 @@
break;
case SPOT_LIGHT:
filter = (R(2) == 1) ?
- SkLightingImageFilter::CreateSpotLitDiffuse(SkPoint3(0, 0, 0),
+ SkLightingImageFilter::CreateSpotLitDiffuse(SkPoint3::Make(0, 0, 0),
make_point(), make_scalar(), make_scalar(), make_color(),
make_scalar(), make_scalar(), make_image_filter()) :
- SkLightingImageFilter::CreateSpotLitSpecular(SkPoint3(0, 0, 0),
+ SkLightingImageFilter::CreateSpotLitSpecular(SkPoint3::Make(0, 0, 0),
make_point(), make_scalar(), make_scalar(), make_color(),
make_scalar(), make_scalar(), SkIntToScalar(R(10)), make_image_filter());
break;