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

Unified Diff: tests/ImageFilterTest.cpp

Issue 1229693009: Add new SkPoint3 class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: More Chromium staging Created 5 years, 5 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 | « src/effects/SkPoint3.cpp ('k') | tests/Point3Test.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ImageFilterTest.cpp
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp
index 480a75fe1d3573d5fbcedb003a019a427170b882..b6d4b3414bc53efaf33354d1f9274991c351c445 100644
--- a/tests/ImageFilterTest.cpp
+++ b/tests/ImageFilterTest.cpp
@@ -26,6 +26,7 @@
#include "SkPicture.h"
#include "SkPictureImageFilter.h"
#include "SkPictureRecorder.h"
+#include "SkPoint3.h"
#include "SkReadBuffer.h"
#include "SkRect.h"
#include "SkRectShaderImageFilter.h"
@@ -244,9 +245,9 @@ DEF_TEST(ImageFilter, reporter) {
{
// This tests for :
// 1 ) location at (0,0,1)
- SkPoint3 location(0, 0, SK_Scalar1);
+ SkPoint3 location = SkPoint3::Make(0, 0, SK_Scalar1);
// 2 ) location and target at same value
- SkPoint3 target(location.fX, location.fY, location.fZ);
+ SkPoint3 target = SkPoint3::Make(location.fX, location.fY, location.fZ);
// 3 ) large negative specular exponent value
SkScalar specularExponent = -1000;
@@ -277,8 +278,7 @@ static void test_crop_rects(SkImageFilter::Proxy* proxy, skiatest::Reporter* rep
SkAutoTUnref<SkImageFilter> input(make_grayscale(NULL, &inputCropRect));
SkAutoTUnref<SkColorFilter> cf(SkColorFilter::CreateModeFilter(SK_ColorRED, SkXfermode::kSrcIn_Mode));
- SkPoint3 location(0, 0, SK_Scalar1);
- SkPoint3 target(SK_Scalar1, SK_Scalar1, SK_Scalar1);
+ SkPoint3 location = SkPoint3::Make(0, 0, SK_Scalar1);
SkScalar kernel[9] = {
SkIntToScalar( 1), SkIntToScalar( 1), SkIntToScalar( 1),
SkIntToScalar( 1), SkIntToScalar(-7), SkIntToScalar( 1),
@@ -411,8 +411,7 @@ DEF_TEST(ImageFilterDrawTiled, reporter) {
// Tests pass by not asserting.
SkAutoTUnref<SkColorFilter> cf(SkColorFilter::CreateModeFilter(SK_ColorRED, SkXfermode::kSrcIn_Mode));
- SkPoint3 location(0, 0, SK_Scalar1);
- SkPoint3 target(SK_Scalar1, SK_Scalar1, SK_Scalar1);
+ SkPoint3 location = SkPoint3::Make(0, 0, SK_Scalar1);
SkScalar kernel[9] = {
SkIntToScalar( 1), SkIntToScalar( 1), SkIntToScalar( 1),
SkIntToScalar( 1), SkIntToScalar(-7), SkIntToScalar( 1),
« no previous file with comments | « src/effects/SkPoint3.cpp ('k') | tests/Point3Test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698