From 528952b5afea0e82bf6db9ef22128533d50ef9e3 Mon Sep 17 00:00:00 2001 From: "senorblanco@chromium.org" Date: Thu, 29 Nov 2012 22:39:10 +0000 Subject: [PATCH] Clean up some Windows compiler warnings. Review URL: https://codereview.appspot.com/6844111 git-svn-id: http://skia.googlecode.com/svn/trunk@6628 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/effects/SkMatrixConvolutionImageFilter.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/effects/SkMatrixConvolutionImageFilter.cpp b/src/effects/SkMatrixConvolutionImageFilter.cpp index 079b764b22..b5188b324b 100644 --- a/src/effects/SkMatrixConvolutionImageFilter.cpp +++ b/src/effects/SkMatrixConvolutionImageFilter.cpp @@ -47,8 +47,8 @@ SkMatrixConvolutionImageFilter::SkMatrixConvolutionImageFilter(SkFlattenableRead SkASSERT(readSize == size); fGain = buffer.readScalar(); fBias = buffer.readScalar(); - fTarget.fX = buffer.readScalar(); - fTarget.fY = buffer.readScalar(); + fTarget.fX = buffer.readInt(); + fTarget.fY = buffer.readInt(); fTileMode = (TileMode) buffer.readInt(); fConvolveAlpha = buffer.readBool(); } @@ -60,8 +60,8 @@ void SkMatrixConvolutionImageFilter::flatten(SkFlattenableWriteBuffer& buffer) c buffer.writeScalarArray(fKernel, fKernelSize.fWidth * fKernelSize.fHeight); buffer.writeScalar(fGain); buffer.writeScalar(fBias); - buffer.writeScalar(fTarget.fX); - buffer.writeScalar(fTarget.fY); + buffer.writeInt(fTarget.fX); + buffer.writeInt(fTarget.fY); buffer.writeInt((int) fTileMode); buffer.writeBool(fConvolveAlpha); } @@ -478,8 +478,8 @@ GrMatrixConvolutionEffect::GrMatrixConvolutionEffect(GrTexture* texture, for (int i = 0; i < kernelSize.width() * kernelSize.height(); i++) { fKernel[i] = SkScalarToFloat(kernel[i]); } - fTarget[0] = target.x(); - fTarget[1] = target.y(); + fTarget[0] = static_cast(target.x()); + fTarget[1] = static_cast(target.y()); } GrMatrixConvolutionEffect::~GrMatrixConvolutionEffect() {