Fix DM build failures:
- forgot tool_main;
- skip building where skia_gpu is false;
- lots of scalar -> int warnings;
- stray return on a void method;
- stifle warning about a uint32_t cast to bool
BUG=
R=bungeman@google.com
Author: mtklein@google.com
Review URL: https://codereview.chromium.org/26468005
git-svn-id: http://skia.googlecode.com/svn/trunk@11821 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/dm/DMReplayTask.cpp b/dm/DMReplayTask.cpp
index bc94f73..7e183f6 100644
--- a/dm/DMReplayTask.cpp
+++ b/dm/DMReplayTask.cpp
@@ -19,7 +19,9 @@
void ReplayTask::draw() {
SkPicture picture;
- SkCanvas* canvas = picture.beginRecording(fGM->width(), fGM->height(), 0 /*flags*/);
+ SkCanvas* canvas = picture.beginRecording(SkScalarCeilToInt(fGM->width()),
+ SkScalarCeilToInt(fGM->height()),
+ 0 /*flags*/);
canvas->concat(fGM->getInitialTransform());
fGM->draw(canvas);
@@ -28,7 +30,7 @@
picture.endRecording();
SkBitmap bitmap;
- bitmap.setConfig(fConfig, fGM->width(), fGM->height());
+ bitmap.setConfig(fConfig, SkScalarCeilToInt(fGM->width()), SkScalarCeilToInt(fGM->height()));
bitmap.allocPixels();
bitmap.eraseColor(0x00000000);