aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--experimental/SkSetPoly3To3_A.cpp4
-rw-r--r--experimental/SkSetPoly3To3_D.cpp4
-rw-r--r--src/gpu/GrContext.cpp3
-rw-r--r--src/gpu/SkGpuDevice.cpp12
-rw-r--r--src/pdf/SkPDFDevice.cpp3
5 files changed, 15 insertions, 11 deletions
diff --git a/experimental/SkSetPoly3To3_A.cpp b/experimental/SkSetPoly3To3_A.cpp
index a0f955c6cb..bf41713001 100644
--- a/experimental/SkSetPoly3To3_A.cpp
+++ b/experimental/SkSetPoly3To3_A.cpp
@@ -32,7 +32,7 @@
#endif
static SkDScalar SkDScalar_setMul(SkScalar a, SkScalar b) {
- return (SkDScalar)a * b;
+ return (SkDScalar) ((SkDScalar) a * b);
}
static void computeOuterProduct(SkScalar op[4],
@@ -59,7 +59,7 @@ static SkScalar dot(SkScalar ax, SkScalar ay, SkScalar bx, SkScalar by) {
return SkDScalar_toScalar(ddot(ax, ay, bx, by));
}
-bool SkSetPoly3To3(SkMatrix* matrix, const SkPoint src[3], const SkPoint dst[3]) {
+bool SkSetPoly3To3_A(SkMatrix* matrix, const SkPoint src[3], const SkPoint dst[3]) {
const SkPoint& srcAve = src[0];
const SkPoint& dstAve = dst[0];
diff --git a/experimental/SkSetPoly3To3_D.cpp b/experimental/SkSetPoly3To3_D.cpp
index 810e6b21d0..0225581ed2 100644
--- a/experimental/SkSetPoly3To3_D.cpp
+++ b/experimental/SkSetPoly3To3_D.cpp
@@ -17,7 +17,7 @@ static SkScalar SkDScalar_toScalar(SkDScalar value) {
}
static SkDScalar SkDScalar_setMul(SkScalar a, SkScalar b) {
- return (SkDScalar)a * b;
+ return (SkDScalar) ((SkDScalar) a * b);
}
static void computeOuterProduct(SkMatrix* matrix,
@@ -48,7 +48,7 @@ static SkScalar dot(SkScalar ax, SkScalar ay, SkScalar bx, SkScalar by) {
SkDScalar_setMul(ay, by));
}
-bool SkSetPoly3To3(SkMatrix* matrix, const SkPoint src[3], const SkPoint dst[3]) {
+bool SkSetPoly3To3_D(SkMatrix* matrix, const SkPoint src[3], const SkPoint dst[3]) {
const SkPoint& srcAve = src[0];
const SkPoint& dstAve = dst[0];
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();
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index cf23e6dbdf..f3aaa5efae 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -1137,7 +1137,8 @@ SkData* SkPDFDevice::copyContentToData() const {
// we have to clip to the content area; we've already applied the
// initial transform, so just clip to the device size.
if (fPageSize != fContentSize) {
- SkRect r = SkRect::MakeWH(this->width(), this->height());
+ SkRect r = SkRect::MakeWH(SkIntToScalar(this->width()),
+ SkIntToScalar(this->height()));
emit_clip(NULL, &r, &data);
}