зеркало из https://github.com/mozilla/moz-skia.git
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
This commit is contained in:
Родитель
972bfc4944
Коммит
ec0aa764eb
|
@ -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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче