aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-04-10 18:32:35 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-04-10 18:32:35 +0000
commit8637a365518a82901d313d61eecd83a0c5102fe9 (patch)
tree08a09f8709a9780aec606fa728d2e46516752940 /src/gpu
parentfb173424e915e696a73067d616ce4f39a407261a (diff)
Minor Windows compiler complaint fixes
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/GrContext.cpp3
-rw-r--r--src/gpu/SkGpuDevice.cpp12
2 files changed, 9 insertions, 6 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index a87631c96d..f044909452 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -2108,7 +2108,8 @@ GrTexture* GrContext::gaussianBlur(GrTexture* srcTexture,
SkRect srcRect(rect);
scale_rect(&srcRect, 1.0f / scaleFactorX, 1.0f / scaleFactorY);
srcRect.roundOut();
- scale_rect(&srcRect, scaleFactorX, scaleFactorY);
+ scale_rect(&srcRect, static_cast<float>(scaleFactorX),
+ static_cast<float>(scaleFactorY));
this->setClip(srcRect);
const GrTextureDesc desc = {
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index c2e090c3be..cf05284740 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1431,8 +1431,8 @@ static GrTexture* filter_texture(GrContext* context, GrTexture* texture,
const GrTextureDesc desc = {
kRenderTarget_GrTextureFlagBit,
- rect.width(),
- rect.height(),
+ SkScalarCeilToInt(rect.width()),
+ SkScalarCeilToInt(rect.height()),
kRGBA_8888_PM_GrPixelConfig,
0 // samples
};
@@ -1490,7 +1490,7 @@ void SkGpuDevice::drawSprite(const SkDraw& draw, const SkBitmap& bitmap,
SkImageFilter* filter = paint.getImageFilter();
if (NULL != filter) {
GrTexture* filteredTexture = filter_texture(fContext, texture, filter,
- GrRect::MakeWH(w, h));
+ GrRect::MakeWH(SkIntToScalar(w), SkIntToScalar(h)));
if (filteredTexture) {
grPaint.setTexture(kBitmapTextureIdx, filteredTexture);
texture = filteredTexture;
@@ -1529,7 +1529,8 @@ void SkGpuDevice::drawDevice(const SkDraw& draw, SkDevice* device,
SkImageFilter* filter = paint.getImageFilter();
if (NULL != filter) {
- GrRect rect = GrRect::MakeWH(devTex->width(), devTex->height());
+ GrRect rect = GrRect::MakeWH(SkIntToScalar(devTex->width()),
+ SkIntToScalar(devTex->height()));
GrTexture* filteredTexture = filter_texture(fContext, devTex, filter,
rect);
if (filteredTexture) {
@@ -1591,7 +1592,8 @@ bool SkGpuDevice::filterImage(SkImageFilter* filter, const SkBitmap& src,
SkAutoCachedTexture act(this, src, sampler, &texture);
result->setConfig(src.config(), src.width(), src.height());
- GrRect rect = GrRect::MakeWH(src.width(), src.height());
+ GrRect rect = GrRect::MakeWH(SkIntToScalar(src.width()),
+ SkIntToScalar(src.height()));
GrTexture* resultTexture = filter_texture(fContext, texture, filter, rect);
if (resultTexture) {
result->setPixelRef(new SkGrTexturePixelRef(resultTexture))->unref();