fixed compiler complaints
authorrobertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 17 Sep 2012 12:05:40 +0000 (12:05 +0000)
committerrobertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 17 Sep 2012 12:05:40 +0000 (12:05 +0000)
http://codereview.appspot.com/6499124/

git-svn-id: http://skia.googlecode.com/svn/trunk@5565 2bbb7eff-a529-9590-31e7-b0007b416f81

gm/distantclip.cpp
gm/gradtext.cpp
tests/PathTest.cpp

index 09dacea..6691d2a 100644 (file)
@@ -36,7 +36,12 @@ protected:
         SkCanvas* rec = pict.beginRecording(100, offset + extents);
         rec->drawColor(0xffff0000);
         rec->save();
-        SkRect r = {-extents, offset - extents, extents, offset + extents};
+        SkRect r = {
+            SkIntToScalar(-extents), 
+            SkIntToScalar(offset - extents), 
+            SkIntToScalar(extents), 
+            SkIntToScalar(offset + extents) 
+        };
         SkPath p;
         p.addRoundRect(r, 5, 5);
         rec->clipPath(p, SkRegion::kIntersect_Op, true);
@@ -51,7 +56,8 @@ protected:
 
         // Finally we play the part of that second picture that should be green into the canvas.
         canvas->save();
-        canvas->translate(extents / 2, -(offset - extents / 2));
+        canvas->translate(SkIntToScalar(extents / 2), 
+                          SkIntToScalar(-(offset - extents / 2)));
         pict2.draw(canvas);
         canvas->restore();
 
index d080e3e..67dd11e 100644 (file)
@@ -75,8 +75,6 @@ protected:
     virtual SkISize onISize() { return make_isize(500, 480); }
     virtual void onDraw(SkCanvas* canvas) {
         SkPaint paint;
-        SkRect r = SkRect::MakeWH(SkIntToScalar(100), SkIntToScalar(100));
-
 
         paint.setStyle(SkPaint::kFill_Style);
         canvas->drawText("Normal Fill Text", 16, 0, 50, paint);
index 8b2d87e..8197e68 100644 (file)
@@ -1521,14 +1521,6 @@ static void test_oval(skiatest::Reporter* reporter) {
 }
 
 static void TestPath(skiatest::Reporter* reporter) {
-    {
-        SkSize size;
-        size.fWidth = 3.4f;
-        size.width();
-        size = SkSize::Make(3,4);
-        SkISize isize = SkISize::Make(3,4);
-    }
-
     SkTSize<SkScalar>::Make(3,4);
 
     SkPath  p, p2;