Chromium Code Reviews

Unified Diff: include/effects/SkLightingImageFilter.h

Issue 395603002: Simplify flattening to just write enough to call the factory (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: simplify xfermodes, fix SkLayerDrawLooper Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: include/effects/SkLightingImageFilter.h
diff --git a/include/effects/SkLightingImageFilter.h b/include/effects/SkLightingImageFilter.h
index 81e8f43f11e5360c6710e2c301d483ca2922d0f4..3e055a80caa29f107b8a0cf19cffe1eb4982beb2 100644
--- a/include/effects/SkLightingImageFilter.h
+++ b/include/effects/SkLightingImageFilter.h
@@ -74,14 +74,16 @@ protected:
SkScalar surfaceScale,
SkImageFilter* input,
const CropRect* cropRect);
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
explicit SkLightingImageFilter(SkReadBuffer& buffer);
+#endif
virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
- const SkLight* light() const { return fLight; }
+ const SkLight* light() const { return fLight.get(); }
SkScalar surfaceScale() const { return fSurfaceScale; }
private:
typedef SkImageFilter INHERITED;
- SkLight* fLight;
+ SkAutoTUnref<SkLight> fLight;
SkScalar fSurfaceScale;
};

Powered by Google App Engine