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

Unified Diff: src/effects/SkLightingImageFilter.cpp

Issue 769953002: Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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/SkLerpXfermode.cpp ('k') | src/effects/SkLumaColorFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkLightingImageFilter.cpp
diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp
index bf9877e044a2dc839bc9635a47c33dbddf33c83d..740ad029699fc30c887b5452023f6ac91432a061 100644
--- a/src/effects/SkLightingImageFilter.cpp
+++ b/src/effects/SkLightingImageFilter.cpp
@@ -290,9 +290,6 @@ protected:
SkDiffuseLightingImageFilter(SkLight* light, SkScalar surfaceScale,
SkScalar kd, SkImageFilter* input, const CropRect* cropRect,
uint32_t uniqueID);
-#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
- explicit SkDiffuseLightingImageFilter(SkReadBuffer& buffer);
-#endif
virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE;
virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE;
@@ -322,9 +319,6 @@ protected:
SkSpecularLightingImageFilter(SkLight* light, SkScalar surfaceScale, SkScalar ks,
SkScalar shininess, SkImageFilter* input, const CropRect*,
uint32_t uniqueID);
-#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
- explicit SkSpecularLightingImageFilter(SkReadBuffer& buffer);
-#endif
virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE;
virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE;
@@ -942,15 +936,6 @@ SkImageFilter* SkLightingImageFilter::CreateSpotLitSpecular(const SkPoint3& loca
SkLightingImageFilter::~SkLightingImageFilter() {}
-#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
-SkLightingImageFilter::SkLightingImageFilter(SkReadBuffer& buffer)
- : INHERITED(1, buffer) {
- fLight.reset(SkLight::UnflattenLight(buffer));
- fSurfaceScale = buffer.readScalar();
- buffer.validate(SkScalarIsFinite(fSurfaceScale));
-}
-#endif
-
void SkLightingImageFilter::flatten(SkWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
fLight->flattenLight(buffer);
@@ -981,15 +966,6 @@ SkDiffuseLightingImageFilter::SkDiffuseLightingImageFilter(SkLight* light, SkSca
{
}
-#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
-SkDiffuseLightingImageFilter::SkDiffuseLightingImageFilter(SkReadBuffer& buffer)
- : INHERITED(buffer)
-{
- fKD = buffer.readScalar();
- buffer.validate(SkScalarIsFinite(fKD) && (fKD >= 0));
-}
-#endif
-
SkFlattenable* SkDiffuseLightingImageFilter::CreateProc(SkReadBuffer& buffer) {
SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1);
SkAutoTUnref<SkLight> light(SkLight::UnflattenLight(buffer));
@@ -1096,17 +1072,6 @@ SkSpecularLightingImageFilter::SkSpecularLightingImageFilter(SkLight* light, SkS
{
}
-#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
-SkSpecularLightingImageFilter::SkSpecularLightingImageFilter(SkReadBuffer& buffer)
- : INHERITED(buffer)
-{
- fKS = buffer.readScalar();
- fShininess = buffer.readScalar();
- buffer.validate(SkScalarIsFinite(fKS) && (fKS >= 0) &&
- SkScalarIsFinite(fShininess));
-}
-#endif
-
SkFlattenable* SkSpecularLightingImageFilter::CreateProc(SkReadBuffer& buffer) {
SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1);
SkAutoTUnref<SkLight> light(SkLight::UnflattenLight(buffer));
« no previous file with comments | « src/effects/SkLerpXfermode.cpp ('k') | src/effects/SkLumaColorFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698