Remove SkLights include from SkCanvas.h

SkLights.h pulls in a bunch of other headers and is not needed (fwdecl
works fine).

Change-Id: Id2d7176eb3bf4609f72f46d513eebf59318f542f
Reviewed-on: https://skia-review.googlesource.com/14904
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
This commit is contained in:
Florin Malita 2017-05-01 13:22:11 -04:00 committed by Skia Commit-Bot
parent e7e1d9d039
commit 9ff301bf91
46 changed files with 84 additions and 39 deletions

View File

@ -6,6 +6,7 @@
*/
#include "Benchmark.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkColorSpaceXformCanvas.h"
#include "SkString.h"

View File

@ -5,6 +5,7 @@
* found in the LICENSE file.
*/
#include "Benchmark.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkMatrix.h"
#include "SkPaint.h"

View File

@ -6,6 +6,7 @@
*/
#include "Benchmark.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkRect.h"
#include "SkString.h"

View File

@ -10,6 +10,7 @@
#include "SkBlurImageFilter.h"
#include "SkDisplacementMapEffect.h"
#include "SkCanvas.h"
#include "SkImage.h"
#include "SkMergeImageFilter.h"

View File

@ -6,6 +6,7 @@
*/
#include "Benchmark.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkMagnifierImageFilter.h"
#include "SkRandom.h"

View File

@ -6,6 +6,7 @@
*/
#include "Benchmark.h"
#include "SkBitmap.h"
#include "SkCanvas.h"

View File

@ -9,6 +9,7 @@
#include "SkCanvas.h"
#include "SkPaint.h"
#include "SkRandom.h"
#include "SkShader.h"
#include "SkString.h"
#include "SkTemplates.h"

View File

@ -6,6 +6,7 @@
*/
#include "Benchmark.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkString.h"

View File

@ -8,6 +8,7 @@
#include "gm.h"
#include "Resources.h"
#include "SkCodec.h"
#include "SkImage.h"
namespace skiagm {

View File

@ -10,6 +10,7 @@
#include "SkColorSpace_Base.h"
#include "SkColorSpaceXform.h"
#include "SkRect.h"
#include "SkShader.h"
class ColorSpaceXformGM : public skiagm::GM {
public:

View File

@ -10,6 +10,7 @@
#include "SkCanvas.h"
#include "SkGradientShader.h"
#include "SkGraphics.h"
#include "SkImage.h"
#include "SkShader.h"
#include "SkString.h"
#include "SkTDArray.h"

View File

@ -7,6 +7,7 @@
#include <vector>
#include "gm.h"
#include "SkImage.h"
#include "SkMipMap.h"
#include "Resources.h"

View File

@ -10,6 +10,7 @@
#include "Resources.h"
#include "SkCanvas.h"
#include "SkData.h"
#include "SkImage.h"
#include "SkImageEncoderPriv.h"
#include "SkUnPreMultiply.h"

View File

@ -12,6 +12,7 @@
#include "SkCodec.h"
#include "SkColorSpace_Base.h"
#include "SkData.h"
#include "SkImage.h"
#include "SkImageEncoderPriv.h"
#include "SkPM4f.h"
#include "SkSRGB.h"

View File

@ -8,6 +8,7 @@
#include "sk_tool_utils.h"
#include "SkCanvas.h"
#include "SkData.h"
#include "SkImage.h"
#include "SkImageEncoder.h"
#include "Resources.h"

View File

@ -6,6 +6,7 @@
*/
#include "gm.h"
#include "SkColorPriv.h"
#include "SkColorSpaceXform.h"
#include "SkColorSpaceXformPriv.h"
#include "SkOpts.h"

View File

@ -7,6 +7,7 @@
#include "Resources.h"
#include "SkBitmap.h"
#include "SkShader.h"
#include "gm.h"
DEF_SIMPLE_GM(bitmap_subset_shader, canvas, 256, 256) {

View File

@ -14,7 +14,6 @@
#include "SkPaint.h"
#include "SkRasterHandleAllocator.h"
#include "SkSurfaceProps.h"
#include "SkLights.h"
#include "../private/SkShadowParams.h"
class GrContext;
@ -28,6 +27,7 @@ class SkDrawable;
class SkDrawFilter;
class SkImage;
class SkImageFilter;
class SkLights;
class SkMetaData;
class SkPath;
class SkPicture;

View File

@ -11,6 +11,7 @@
#include "SkData.h"
#include "SkCanvas.h"
#include "SkDrawable.h"
#include "SkImage.h"
#include "SkImageFilter.h"
#include "SkMatrix.h"
#include "SkPath.h"

View File

@ -6,6 +6,7 @@
*/
#include "SampleCode.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkGeometry.h"
#include "SkIntersections.h"

View File

@ -11,6 +11,7 @@
#include "SkUtils.h"
#include "SkColorPriv.h"
#include "SkColorFilter.h"
#include "SkImage.h"
#include "SkRandom.h"
#include "SkSystemEventTypes.h"
#include "SkTime.h"

View File

@ -6,6 +6,7 @@
*/
#include "SampleCode.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkPaint.h"
#include "SkPath.h"

View File

@ -20,6 +20,7 @@
#include "SkImageFilter.h"
#include "SkImageFilterCache.h"
#include "SkLatticeIter.h"
#include "SkLights.h"
#include "SkMakeUnique.h"
#include "SkMatrixUtils.h"
#include "SkMetaData.h"

View File

@ -13,6 +13,7 @@
#include "SkCanvas.h"
#include "SkMask.h"
#include "SkPaint.h"
#include "SkPixmap.h"
#include "SkStrokeRec.h"
#include "SkVertices.h"

View File

@ -8,6 +8,7 @@
#include "SkCanvas.h"
#include "SkData.h"
#include "SkDrawFilter.h"
#include "SkImage.h"
#include "SkImageFilter.h"
#include "SkLiteDL.h"
#include "SkMath.h"

View File

@ -14,6 +14,7 @@
#include "SkDrawable.h"
#include "SkRect.h"
#include "SkTDArray.h"
#include "SkTemplates.h"
class SkLiteDL final {
public:

View File

@ -14,6 +14,7 @@
#include "SkPathEffect.h"
#include "SkRecords.h"
#include "SkShader.h"
#include "SkTLogic.h"
// N.B. This name is slightly historical: hunting season is now open for SkImages too.

View File

@ -6,6 +6,7 @@
*/
#include "SkRecord.h"
#include "SkImage.h"
#include <algorithm>
SkRecord::~SkRecord() {

View File

@ -6,6 +6,7 @@
*/
#include "SkRecordDraw.h"
#include "SkImage.h"
#include "SkPatchUtils.h"
void SkRecordDraw(const SkRecord& record,

View File

@ -5,6 +5,7 @@
* found in the LICENSE file.
*/
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkGlyph.h"
#include "SkMakeUnique.h"

View File

@ -5,6 +5,7 @@
* found in the LICENSE file.
*/
#include "SkImage.h"
#include "SkLatticeIter.h"
#include "SkPDFCanvas.h"
#include "SkPDFDevice.h"

View File

@ -7,6 +7,7 @@
#include "SkData.h"
#include "SkDumpCanvas.h"
#include "SkImage.h"
#include "SkPatchUtils.h"
#include "SkPicture.h"
#include "SkPixelRef.h"

View File

@ -8,6 +8,7 @@
#ifndef SkShadowPaintFilterCanvas_DEFINED
#define SkShadowPaintFilterCanvas_DEFINED
#include "SkLights.h"
#include "SkPaintFilterCanvas.h"
#ifdef SK_EXPERIMENTAL_SHADOWING

View File

@ -8,6 +8,7 @@
#include "SkShadowUtils.h"
#include "SkCanvas.h"
#include "SkColorFilter.h"
#include "SkColorPriv.h"
#include "SkPath.h"
#include "SkRandom.h"
#include "SkResourceCache.h"

View File

@ -6,6 +6,7 @@
*/
#include "CanvasStateHelpers.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkClipOpPriv.h"
#include "SkCanvasStateUtils.h"

View File

@ -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 @@ DEF_TEST(ClipCubic, reporter) {
#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);
}

View File

@ -5,6 +5,7 @@
* found in the LICENSE file.
*/
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkEdgeClipper.h"
#include "SkLineClipper.h"

View File

@ -5,6 +5,7 @@
* found in the LICENSE file.
*/
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkPath.h"
#include "Test.h"

View File

@ -5,6 +5,7 @@
* found in the LICENSE file.
*/
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkHighContrastFilter.h"
#include "Test.h"

View File

@ -5,6 +5,7 @@
* found in the LICENSE file.
*/
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkBBoxHierarchy.h"
#include "SkPaint.h"

View File

@ -5,6 +5,7 @@
* found in the LICENSE file
*/
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkSpecialImage.h"
#include "SkSpecialSurface.h"

View File

@ -8,6 +8,7 @@
#ifndef SKDRAWCOMMAND_H_
#define SKDRAWCOMMAND_H_
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkTLazy.h"
#include "SkPath.h"

View File

@ -6,6 +6,7 @@
*/
#include "DumpRecord.h"
#include "SkBitmap.h"
#include "SkCommandLineFlags.h"
#include "SkDeferredCanvas.h"
#include "SkPicture.h"

View File

@ -10,6 +10,7 @@
// * ok is entirely opt-in. No more maintaining huge --blacklists.
#include "SkGraphics.h"
#include "SkImage.h"
#include "ok.h"
#include <chrono>
#include <future>

View File

@ -7,6 +7,7 @@
#include "ok.h"
#include "gm.h"
#include "SkData.h"
#include "SkOSFile.h"
#include "SkPicture.h"
#include <vector>

View File

@ -5,6 +5,7 @@
* found in the LICENSE file.
*/
#include "SkImage.h"
#include "SkOSFile.h"
#include "SkPictureRecorder.h"
#include "ok.h"