Revert "Revert "Reland: Remove SkLights include from SkCanvas.h""
This reverts commit 9d5f66d9c21eda7d3e2ed47654180c0c4b6e38b1.
Reason for revert: Leon landed Android fixes.
Original change's description:
> Revert "Reland: Remove SkLights include from SkCanvas.h"
>
> This reverts commit fed00319c9bafa41c8df658708030c072b301a41.
>
> Reason for revert: breaking the Android roll.
>
> Original change's description:
> > Reland: Remove SkLights include from SkCanvas.h
> >
> > SkLights.h pulls in a bunch of other headers and is not needed (fwdecl
> > works fine).
> >
> > Change-Id: I3ed97cd7861e51dcb7cfa7950a97b420dbc6fbfb
> > TBR=reed@google.com
> > Reviewed-on: https://skia-review.googlesource.com/15143
> > Commit-Queue: Florin Malita <fmalita@chromium.org>
> > Reviewed-by: Florin Malita <fmalita@chromium.org>
> >
>
> TBR=fmalita@chromium.org,reed@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Change-Id: I3b0e69f1d04d160f16a5567b09982d35cc9ca84e
> Reviewed-on: https://skia-review.googlesource.com/15195
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Florin Malita <fmalita@chromium.org>
>
TBR=msarett@google.com,reviews@skia.org,fmalita@chromium.org,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I0a1c2f9df61f16987ab72dfb4f3a205fbcc37667
Reviewed-on: https://skia-review.googlesource.com/15229
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
diff --git a/tests/ClipCubicTest.cpp b/tests/ClipCubicTest.cpp
index 1d88eae..854ac32 100644
--- a/tests/ClipCubicTest.cpp
+++ b/tests/ClipCubicTest.cpp
@@ -5,6 +5,7 @@
* found in the LICENSE file.
*/
+#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkCubicClipper.h"
#include "SkGeometry.h"
@@ -165,41 +166,41 @@
#include "SkSurface.h"
-DEF_TEST(test_fuzz_crbug_698714, reporter) {
- auto surface(SkSurface::MakeRasterN32Premul(500, 500));
- SkCanvas* canvas = surface->getCanvas();
- SkPaint paint;
- paint.setAntiAlias(true);
- SkPath path;
- path.setFillType(SkPath::kWinding_FillType);
- path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0,0
- path.lineTo(SkBits2Float(0x43434343), SkBits2Float(0x43430143)); //195.263f, 195.005f
- path.lineTo(SkBits2Float(0x43434343), SkBits2Float(0x43434343)); //195.263f, 195.263f
- path.lineTo(SkBits2Float(0xb5434343), SkBits2Float(0x434300be)); //-7.2741e-07f, 195.003f
- // 195.263f, 195.263f, -1.16387e-05f, 3.58641e-38f, 3.85088e-29f,1.86082e-39f
- path.cubicTo(SkBits2Float(0x43434343), SkBits2Float(0x43434341),
- SkBits2Float(0xb74343bd), SkBits2Float(0x01434343),
- SkBits2Float(0x10434343), SkBits2Float(0x00144332));
- // 4.11823e-38f, 195.263f, 195.263f, 195.263f, -7.2741e-07f, 195.263f
- path.cubicTo(SkBits2Float(0x016037c0), SkBits2Float(0x43434343),
- SkBits2Float(0x43434343), SkBits2Float(0x43434343),
- SkBits2Float(0xb5434343), SkBits2Float(0x43434343));
- // 195.263f, 195.263f, -1.16387e-05f, 3.58641e-38f, 195.263f, -2
- path.cubicTo(SkBits2Float(0x43434344), SkBits2Float(0x43434341),
- SkBits2Float(0xb74343bd), SkBits2Float(0x01434343),
- SkBits2Float(0x43434343), SkBits2Float(0xc0000014));
- // -5.87228e+06f, 3.7773e-07f, 3.60231e-13f, -6.64511e+06f,2.77692e-15f, 2.48803e-15f
- path.cubicTo(SkBits2Float(0xcab33535), SkBits2Float(0x34cacaca),
- SkBits2Float(0x2acacaca), SkBits2Float(0xcacacae3),
- SkBits2Float(0x27481927), SkBits2Float(0x27334805));
- path.lineTo(SkBits2Float(0xb5434343), SkBits2Float(0x43434343)); //-7.2741e-07f, 195.263f
- // 195.263f, 195.263f, -1.16387e-05f, 195.212f, 195.263f, -2
- path.cubicTo(SkBits2Float(0x43434343), SkBits2Float(0x43434341),
- SkBits2Float(0xb74343b9), SkBits2Float(0x43433643),
- SkBits2Float(0x43434343), SkBits2Float(0xc0000014));
- path.lineTo(SkBits2Float(0xc7004343), SkBits2Float(0x27480527)); //-32835.3f, 2.77584e-15f
- path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0,0
- path.close();
- canvas->clipRect({0, 0, 65, 202});
- canvas->drawPath(path, paint);
-}
+DEF_TEST(test_fuzz_crbug_698714, reporter) {
+ auto surface(SkSurface::MakeRasterN32Premul(500, 500));
+ SkCanvas* canvas = surface->getCanvas();
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ SkPath path;
+ path.setFillType(SkPath::kWinding_FillType);
+ path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0,0
+ path.lineTo(SkBits2Float(0x43434343), SkBits2Float(0x43430143)); //195.263f, 195.005f
+ path.lineTo(SkBits2Float(0x43434343), SkBits2Float(0x43434343)); //195.263f, 195.263f
+ path.lineTo(SkBits2Float(0xb5434343), SkBits2Float(0x434300be)); //-7.2741e-07f, 195.003f
+ // 195.263f, 195.263f, -1.16387e-05f, 3.58641e-38f, 3.85088e-29f,1.86082e-39f
+ path.cubicTo(SkBits2Float(0x43434343), SkBits2Float(0x43434341),
+ SkBits2Float(0xb74343bd), SkBits2Float(0x01434343),
+ SkBits2Float(0x10434343), SkBits2Float(0x00144332));
+ // 4.11823e-38f, 195.263f, 195.263f, 195.263f, -7.2741e-07f, 195.263f
+ path.cubicTo(SkBits2Float(0x016037c0), SkBits2Float(0x43434343),
+ SkBits2Float(0x43434343), SkBits2Float(0x43434343),
+ SkBits2Float(0xb5434343), SkBits2Float(0x43434343));
+ // 195.263f, 195.263f, -1.16387e-05f, 3.58641e-38f, 195.263f, -2
+ path.cubicTo(SkBits2Float(0x43434344), SkBits2Float(0x43434341),
+ SkBits2Float(0xb74343bd), SkBits2Float(0x01434343),
+ SkBits2Float(0x43434343), SkBits2Float(0xc0000014));
+ // -5.87228e+06f, 3.7773e-07f, 3.60231e-13f, -6.64511e+06f,2.77692e-15f, 2.48803e-15f
+ path.cubicTo(SkBits2Float(0xcab33535), SkBits2Float(0x34cacaca),
+ SkBits2Float(0x2acacaca), SkBits2Float(0xcacacae3),
+ SkBits2Float(0x27481927), SkBits2Float(0x27334805));
+ path.lineTo(SkBits2Float(0xb5434343), SkBits2Float(0x43434343)); //-7.2741e-07f, 195.263f
+ // 195.263f, 195.263f, -1.16387e-05f, 195.212f, 195.263f, -2
+ path.cubicTo(SkBits2Float(0x43434343), SkBits2Float(0x43434341),
+ SkBits2Float(0xb74343b9), SkBits2Float(0x43433643),
+ SkBits2Float(0x43434343), SkBits2Float(0xc0000014));
+ path.lineTo(SkBits2Float(0xc7004343), SkBits2Float(0x27480527)); //-32835.3f, 2.77584e-15f
+ path.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0,0
+ path.close();
+ canvas->clipRect({0, 0, 65, 202});
+ canvas->drawPath(path, paint);
+}