rolling back the experimental rollbacks in r2178-2179

git-svn-id: http://skia.googlecode.com/svn/trunk@2180 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/experimental/Debugger/DebuggerContentView.cpp b/experimental/Debugger/DebuggerContentView.cpp
index 925c372..a5f1c0c 100644
--- a/experimental/Debugger/DebuggerContentView.cpp
+++ b/experimental/Debugger/DebuggerContentView.cpp
@@ -43,7 +43,7 @@
             int offset = 0;
             int frameBound = 0;
             size_t bytesRead;
-            while (offset < size) {
+            while (static_cast<unsigned>(offset) < size) {
                 SkGPipeReader::Status s = dumpReader->playback(data + offset, 
                                                                size - offset, 
                                                                &bytesRead, 
diff --git a/gm/points.cpp b/gm/points.cpp
index ff535cd..4aa6597 100644
--- a/gm/points.cpp
+++ b/gm/points.cpp
@@ -28,8 +28,14 @@
     }
 
     static void fill_pts(SkPoint pts[], size_t n, SkRandom* rand) {
-        for (size_t i = 0; i < n; i++)
-            pts[i].set(rand->nextUScalar1() * 640, rand->nextUScalar1() * 480);
+        for (size_t i = 0; i < n; i++) {
+            // Compute these independently and store in variables, rather
+            // than in the parameter-passing expression, to get consistent
+            // evaluation order across compilers.
+            float y = rand->nextUScalar1() * 480;
+            float x = rand->nextUScalar1() * 640;
+            pts[i].set(x, y);
+        }
     }
 
     virtual void onDraw(SkCanvas* canvas) {
diff --git a/gm/strokerects.cpp b/gm/strokerects.cpp
index 29d8cb0..44c0120 100644
--- a/gm/strokerects.cpp
+++ b/gm/strokerects.cpp
@@ -38,9 +38,11 @@
         SkScalar y = rand.nextUScalar1() * H;
         SkScalar w = rand.nextUScalar1() * (W >> 2);
         SkScalar h = rand.nextUScalar1() * (H >> 2);
+        SkScalar hoffset = rand.nextSScalar1();
+        SkScalar woffset = rand.nextSScalar1();
         
         r->set(x, y, x + w, y + h);
-        r->offset(-w/2 + rand.nextSScalar1(), -h/2 +  + rand.nextSScalar1());
+        r->offset(-w/2 + woffset, -h/2 + hoffset);
     }
 
     virtual void onDraw(SkCanvas* canvas) {
diff --git a/gm/strokes.cpp b/gm/strokes.cpp
index 862a517..d8b21b2 100644
--- a/gm/strokes.cpp
+++ b/gm/strokes.cpp
@@ -25,9 +25,11 @@
     SkScalar y = rand.nextUScalar1() * H;
     SkScalar w = rand.nextUScalar1() * (W >> 2);
     SkScalar h = rand.nextUScalar1() * (H >> 2);
+    SkScalar hoffset = rand.nextSScalar1();
+    SkScalar woffset = rand.nextSScalar1();
     
     r->set(x, y, x + w, y + h);
-    r->offset(-w/2 + rand.nextSScalar1(), -h/2 +  + rand.nextSScalar1());
+    r->offset(-w/2 + woffset, -h/2 + hoffset);
     
     paint->setColor(rand.nextU());
     paint->setAlpha(0xFF);
diff --git a/gpu/src/GrBinHashKey.h b/gpu/src/GrBinHashKey.h
index 936eab0..ceaef7a 100644
--- a/gpu/src/GrBinHashKey.h
+++ b/gpu/src/GrBinHashKey.h
@@ -36,7 +36,7 @@
         return *this;
     }
 
-    virtual ~GrBinHashKey() {
+    ~GrBinHashKey() {
     }
 
     void setKeyData(const uint32_t *data) {
diff --git a/gpu/src/GrClip.cpp b/gpu/src/GrClip.cpp
index 7ccec26..ade8c2b 100644
--- a/gpu/src/GrClip.cpp
+++ b/gpu/src/GrClip.cpp
@@ -138,13 +138,9 @@
         }
     }
     fConservativeBoundsValid = false;
-    if (isectRectValid) {
+    if (isectRectValid && rectCount) {
+        fConservativeBounds = fList[0].fRect;
         fConservativeBoundsValid = true;
-        if (rectCount > 0) {
-            fConservativeBounds = fList[0].fRect;
-        } else {
-            fConservativeBounds.setEmpty();
-        }
     } else if (NULL != conservativeBounds) {
         fConservativeBounds = *conservativeBounds;
         fConservativeBoundsValid = true;
diff --git a/gpu/src/GrGpuFactory.cpp b/gpu/src/GrGpuFactory.cpp
index c3b0242..071e67c 100644
--- a/gpu/src/GrGpuFactory.cpp
+++ b/gpu/src/GrGpuFactory.cpp
@@ -22,7 +22,7 @@
 
 GrGpu* GrGpu::Create(GrEngine engine, GrPlatform3DContext context3D) {
 
-    const GrGLInterface* glInterface;
+    const GrGLInterface* glInterface = NULL;
 
     if (kOpenGL_Shaders_GrEngine == engine ||
         kOpenGL_Fixed_GrEngine == engine) {
diff --git a/gpu/src/GrPathRendererChain.cpp b/gpu/src/GrPathRendererChain.cpp
index afae912..4c76720 100644
--- a/gpu/src/GrPathRendererChain.cpp
+++ b/gpu/src/GrPathRendererChain.cpp
@@ -15,8 +15,8 @@
 
 GrPathRendererChain::GrPathRendererChain(GrContext* context, UsageFlags flags)
     : fInit(false)
-    , fFlags(flags)
     , fOwner(context)
+    , fFlags(flags)
     , fChain(fStorage.get(), kPreAllocCount) {
     fInit = false;
 }
diff --git a/include/pdf/SkPDFDevice.h b/include/pdf/SkPDFDevice.h
index 6a150a1..395968b 100644
--- a/include/pdf/SkPDFDevice.h
+++ b/include/pdf/SkPDFDevice.h
@@ -118,7 +118,7 @@
      *  clipped. A simple way to avoid the bug is to always draw the margin
      *  content last.
      */
-    void setDrawingArea(DrawingArea drawingArea);
+    SK_API void setDrawingArea(DrawingArea drawingArea);
 
     // PDF specific methods.
 
diff --git a/samplecode/SampleCode.h b/samplecode/SampleCode.h
index 2db1955..d6c7929 100644
--- a/samplecode/SampleCode.h
+++ b/samplecode/SampleCode.h
@@ -61,7 +61,7 @@
 
 class SampleView : public SkView {
 public:
-    SampleView() : fRepeatCount(1), fBGColor(SK_ColorWHITE) {
+    SampleView() : fBGColor(SK_ColorWHITE), fRepeatCount(1) {
         fUsePipe = false;
     }
 
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 65f34cc..3bb193b 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -528,7 +528,6 @@
         while ((rec = (MCRec*)iter.next()) != NULL) {
             (void)rec->fRegion->op(bounds, SkRegion::kIntersect_Op);
         }
-        fClipStack.clipDevRect(bounds, SkRegion::kIntersect_Op);
     }
     return device;
 }
@@ -1384,11 +1383,11 @@
 
 void SkCanvas::DrawRect(const SkDraw& draw, const SkPaint& paint,
                         const SkRect& r, SkScalar textSize) {
-    if (paint.getStyle() == SkPaint::kFill_Style) {

+    if (paint.getStyle() == SkPaint::kFill_Style) {
         draw.fDevice->drawRect(draw, r, paint);
     } else {
         SkPaint p(paint);
-        p.setStrokeWidth(SkScalarMul(textSize, paint.getStrokeWidth()));

+        p.setStrokeWidth(SkScalarMul(textSize, paint.getStrokeWidth()));
         draw.fDevice->drawRect(draw, r, p);
     }
 }
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index e72a6b7..8cf1eca 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -517,7 +517,6 @@
     fInitialTransform.preConcat(initialTransform);
 
     SkIRect existingClip = SkIRect::MakeWH(this->width(), this->height());
-    fExistingClipStack.clipDevRect(existingClip);
     fExistingClipRegion.setRect(existingClip);
 
     this->init();
diff --git a/src/pdf/SkPDFFont.cpp b/src/pdf/SkPDFFont.cpp
index 989b276..fe55c8d 100644
--- a/src/pdf/SkPDFFont.cpp
+++ b/src/pdf/SkPDFFont.cpp
@@ -488,7 +488,7 @@
                             (i >> 8) == (currentRangeEntry.fStart >> 8) &&
                             glyphToUnicode[i] == (currentRangeEntry.fUnicode +
                                                   continuousEntries)) {
-                            currentRangeEntry.fEnd = i;
+                    currentRangeEntry.fEnd = i;
                     if (i == glyphToUnicode.count() - 1) {
                         // Last entry is in a range.
                         bfrangeEntries.push(currentRangeEntry);
diff --git a/src/ports/SkFontHost_linux.cpp b/src/ports/SkFontHost_linux.cpp
index 782b93f..b60db07 100644
--- a/src/ports/SkFontHost_linux.cpp
+++ b/src/ports/SkFontHost_linux.cpp
@@ -129,7 +129,7 @@
         }
         curr = curr->fNext;
     }
-    return false;
+    return NULL;
 }
 
 static bool valid_uniqueID(uint32_t uniqueID) {
diff --git a/src/utils/SkParse.cpp b/src/utils/SkParse.cpp
index f93e2ef..cb265c3 100644
--- a/src/utils/SkParse.cpp
+++ b/src/utils/SkParse.cpp
@@ -130,7 +130,7 @@
             *value = n;
         return str;
     }
-    return false;
+    return NULL;
 }
 
 const char* SkParse::FindS32(const char str[], int32_t* value)
diff --git a/src/views/SkView.cpp b/src/views/SkView.cpp
index 69dc6fc..5b15439 100644
--- a/src/views/SkView.cpp
+++ b/src/views/SkView.cpp
@@ -363,7 +363,7 @@
 SkView::Click* SkView::findClickHandler(SkScalar x, SkScalar y)
 {
 	if (x < 0 || y < 0 || x >= fWidth || y >= fHeight) {
-		return false;
+		return NULL;
     }
 
     if (this->onSendClickToChildren(x, y)) {
diff --git a/whitespace.txt b/whitespace.txt
index 45bd404..6eb4b31 100644
--- a/whitespace.txt
+++ b/whitespace.txt
@@ -17,3 +17,6 @@
 
 
 
+
+
+