| Index: src/codec/SkScaledCodec.cpp
|
| diff --git a/src/codec/SkScaledCodec.cpp b/src/codec/SkScaledCodec.cpp
|
| index cf678db8565d0b131d359b28ab6256379e825971..951ab27b1c73def82b545237fe485e4dab58390a 100644
|
| --- a/src/codec/SkScaledCodec.cpp
|
| +++ b/src/codec/SkScaledCodec.cpp
|
| @@ -87,7 +87,7 @@ SkISize SkScaledCodec::onGetScaledDimensions(float desiredScale) const {
|
| }
|
| // sampleSize determines the step size between samples
|
| // Ex: sampleSize = 2, sample every second pixel in x and y directions
|
| - int sampleSize = int(1 / desiredScale);
|
| + int sampleSize = int ((1.0f / desiredScale) + 0.5f);
|
|
|
| int scaledWidth = get_scaled_dimension(this->getInfo().width(), sampleSize);
|
| int scaledHeight = get_scaled_dimension(this->getInfo().height(), sampleSize);
|
|
|