Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(865)

Unified Diff: src/pdf/SkPDFDevice.cpp

Issue 51043005: Fix int/SkScalar mismatch. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFDevice.cpp
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index 91f8e87487676167401c1294709103195abe89b4..d8e7b1394a56aa45e84a8a401dfe3e1ca0cf2f23 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -1357,7 +1357,8 @@ void SkPDFDevice::drawDevice(const SkDraw& d, SkBaseDevice* device,
if (content.needShape()) {
SkPath shape;
shape.addRect(SkRect::MakeXYWH(SkIntToScalar(x), SkIntToScalar(y),
- device->width(), device->height()));
+ SkIntToScalar(device->width()),
+ SkIntToScalar(device->height())));
content.setShape(shape);
}
if (!content.needSource()) {
@@ -2246,7 +2247,8 @@ void SkPDFDevice::internalDrawBitmap(const SkMatrix& origMatrix,
}
if (content.needShape()) {
SkPath shape;
- shape.addRect(SkRect::MakeWH(subset.width(), subset.height()));
+ shape.addRect(SkRect::MakeWH(SkIntToScalar(subset.width()),
+ SkIntToScalar( subset.height())));
shape.transform(matrix);
content.setShape(shape);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698