Chromium Code Reviews| Index: src/utils/SkShadowPaintFilterCanvas.cpp |
| diff --git a/src/utils/SkShadowPaintFilterCanvas.cpp b/src/utils/SkShadowPaintFilterCanvas.cpp |
| index e4308709edf49ed0bd7f1c4734f0a0c1b8abfc54..33bd758a542a8d869cbb9054b0125654503444ad 100644 |
| --- a/src/utils/SkShadowPaintFilterCanvas.cpp |
| +++ b/src/utils/SkShadowPaintFilterCanvas.cpp |
| @@ -50,7 +50,6 @@ bool SkShadowPaintFilterCanvas::onFilter(SkTCopyOnFirstWrite<SkPaint>* paint, Ty |
| SkISize SkShadowPaintFilterCanvas::ComputeDepthMapSize(const SkLights::Light& light, int maxDepth, |
| int width, int height) { |
| - SkASSERT(light.type() != SkLights::Light::kAmbient_LightType); |
| if (light.type() != SkLights::Light::kDirectional_LightType) { |
| return SkISize::Make(width *2 , height * 2); |
| } |
| @@ -79,13 +78,11 @@ void SkShadowPaintFilterCanvas::updateMatrix() { |
| // It is up to the user to set the 0th light in fLights to |
| // the light the want to render the depth map with. |
|
robertphillips
2016/08/26 17:31:29
Don't we still need the if test to eliminate point
vjiaoblack
2016/08/26 18:10:38
Done.
|
| - if (this->fLights->light(0).type() == SkLights::Light::kDirectional_LightType) { |
| - const SkVector3& lightDir = this->fLights->light(0).dir(); |
| - SkScalar x = lightDir.fX * this->getZ(); |
| - SkScalar y = lightDir.fY * this->getZ(); |
| + const SkVector3& lightDir = this->fLights->light(0).dir(); |
| + SkScalar x = lightDir.fX * this->getZ(); |
| + SkScalar y = lightDir.fY * this->getZ(); |
| - this->translate(x, y); |
| - } |
| + this->translate(x, y); |
| } |
| void SkShadowPaintFilterCanvas::onDrawPaint(const SkPaint &paint) { |