diff options
author | george@mozilla.com <george@mozilla.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-09-18 19:05:48 +0000 |
---|---|---|
committer | george@mozilla.com <george@mozilla.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-09-18 19:05:48 +0000 |
commit | ec0aa764ebe36aecdfb77286d665fccc85ab204a (patch) | |
tree | 7a864ca24d1afeb54c142c5f8b5b2b00dfdc8c27 | |
parent | 972bfc494443671c18b0f003a56f3c27592a3bd2 (diff) |
Explicitly convert from int to SkScalar to avoid a compiler error on gcc 4.5
Review URL: https://codereview.appspot.com/6526047
git-svn-id: http://skia.googlecode.com/svn/trunk@5589 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | src/core/SkBBoxRecord.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/SkBBoxRecord.cpp b/src/core/SkBBoxRecord.cpp index 52e5dd3f44..5db77f5f40 100644 --- a/src/core/SkBBoxRecord.cpp +++ b/src/core/SkBBoxRecord.cpp @@ -40,7 +40,7 @@ void SkBBoxRecord::drawPaint(const SkPaint& paint) { void SkBBoxRecord::clear(SkColor color) { SkISize size = this->getDeviceSize(); - SkRect bbox = {0, 0, size.width(), size.height()}; + SkRect bbox = {0, 0, SkIntToScalar(size.width()), SkIntToScalar(size.height())}; this->handleBBox(bbox); INHERITED::clear(color); } @@ -111,7 +111,7 @@ void SkBBoxRecord::drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* sr void SkBBoxRecord::drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& mat, const SkPaint* paint) { SkMatrix m = mat; - SkRect bbox = {0, 0, bitmap.width(), bitmap.height()}; + SkRect bbox = {0, 0, SkIntToScalar(bitmap.width()), SkIntToScalar(bitmap.height())}; m.mapRect(&bbox); if (this->transformBounds(bbox, paint)) { INHERITED::drawBitmapMatrix(bitmap, mat, paint); @@ -179,7 +179,7 @@ void SkBBoxRecord::drawPosTextH(const void* text, size_t byteLength, const SkSca void SkBBoxRecord::drawSprite(const SkBitmap& bitmap, int left, int top, const SkPaint* paint) { - SkRect bbox = {left, top, left + bitmap.width(), top + bitmap.height()}; + SkRect bbox = {SkIntToScalar(left), SkIntToScalar(top), SkIntToScalar(left + bitmap.width()), SkIntToScalar(top + bitmap.height())}; this->handleBBox(bbox); // directly call handleBBox, matrix is ignored INHERITED::drawBitmap(bitmap, left, top, paint); } |