fix build breakage for missing SkScalarToInt

Review URL: https://codereview.chromium.org/23718005

git-svn-id: http://skia.googlecode.com/svn/trunk@11085 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
djsollen@google.com 2013-09-04 18:20:30 +00:00
Родитель 19bcf6e807
Коммит 1037c7b9f2
1 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -94,17 +94,16 @@ static void test_complex_clips(skiatest::Reporter* reporter) {
const int WIDTH = 400;
const int HEIGHT = 400;
const SkScalar SPACER = SkIntToScalar(10);
const int SPACER = 10;
SkRect layerRect = SkRect::MakeWH(SkIntToScalar(WIDTH), SkIntToScalar(HEIGHT / 4));
SkIRect layerRect = SkIRect::MakeWH(WIDTH, HEIGHT / 4);
layerRect.inset(2*SPACER, 2*SPACER);
SkRect clipRect = layerRect;
SkIRect clipRect = layerRect;
clipRect.fRight = clipRect.fLeft + (clipRect.width() / 2) - (2*SPACER);
clipRect.outset(SPACER, SPACER);
SkIRect regionBounds;
clipRect.roundIn(&regionBounds);
SkIRect regionBounds = clipRect;
regionBounds.offset(clipRect.width() + (2*SPACER), 0);
SkIRect regionInterior = regionBounds;
@ -138,7 +137,8 @@ static void test_complex_clips(skiatest::Reporter* reporter) {
SkRegion localRegion = clipRegion;
for (int j = 0; j < layerCombinations; ++j) {
canvas.saveLayerAlpha(&layerRect, 128, flags[j]);
SkRect layerBounds = SkRect::Make(layerRect);
canvas.saveLayerAlpha(&layerBounds, 128, flags[j]);
SkCanvasState* state = NULL;
SkCanvas* tmpCanvas = NULL;
@ -152,7 +152,7 @@ static void test_complex_clips(skiatest::Reporter* reporter) {
}
tmpCanvas->save();
tmpCanvas->clipRect(clipRect, clipOps[j]);
tmpCanvas->clipRect(SkRect::Make(clipRect), clipOps[j]);
tmpCanvas->drawColor(SK_ColorBLUE);
tmpCanvas->restore();
@ -165,7 +165,7 @@ static void test_complex_clips(skiatest::Reporter* reporter) {
canvas.restore();
// translate the canvas and region for the next iteration
canvas.translate(0, 2*(layerRect.height() + SPACER));
canvas.translate(0, SkIntToScalar(2*(layerRect.height() + (SPACER))));
localRegion.translate(0, 2*(layerRect.height() + SPACER));
}
}