Revert of Fix GPU clipped-AA vs. non-AA drawRect discrepancy (patchset #2 id:20001 of https://codereview.chromium.org/839883003/)

Reason for revert:
This CL introduces rendering conflicts with hairlines (i.e., the hairlines get overwritten). These conflicts are particularly visible on the following GMs (for the Ubuntu and Android gpu configs):

coloremoji & complexclip2_rrect_bw

Original issue's description:
> Fix GPU clipped-AA vs. non-AA drawRect discrepancy
>
> In the clip stack we were manually rounding out non-AA clip rects but leaving the hardening of non-AA drawRects up to the GPU. In some border cases the GPU can truncate rather than round out resulting in visual discrepancies.
>
> BUG=423834
>
> Committed: https://skia.googlesource.com/skia/+/933a03fecb65c83f81cf65d5cf9870c69aa379ff

TBR=bsalomon@google.com,jvanverth@google.com
NOTREECHECKS=true
NOTRY=true
BUG=423834

Review URL: https://codereview.chromium.org/847033002
diff --git a/expectations/gm/ignored-tests.txt b/expectations/gm/ignored-tests.txt
index 588ec29..292bd100 100644
--- a/expectations/gm/ignored-tests.txt
+++ b/expectations/gm/ignored-tests.txt
@@ -41,12 +41,3 @@
 dropshadowimagefilter
 
 
-# robertphillips - https://codereview.chromium.org/839883003/
-complexclip_bw
-complexclip_bw_invert
-complexclip_bw_layer
-complexclip_bw_layer_invert
-complexclip3_complex
-complexclip3_simple
-convex_poly_clip
-dftext
diff --git a/gm/clipdrawdraw.cpp b/gm/clipdrawdraw.cpp
deleted file mode 100644
index 0e471dd..0000000
--- a/gm/clipdrawdraw.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright 2014 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "gm.h"
-
-namespace skiagm {
-
-// This GM exercises the use case found in crbug.com/423834.
-// The following pattern:
-//    clipRect(r);
-//    drawRect(r, withAA);
-//    drawRect(r, noAA);
-// can leave 1 pixel wide remnants of the first rect.
-class ClipDrawDrawGM : public GM {
-public:
-    ClipDrawDrawGM() {
-        this->setBGColor(0xFFCCCCCC);
-    }
-
-protected:
-    SkString onShortName() SK_OVERRIDE {
-        return SkString("clipdrawdraw");
-    }
-
-    SkISize onISize() SK_OVERRIDE {
-        return SkISize::Make(512, 512);
-    }
-
-    // Vertical remnant
-    static void draw1(SkCanvas* canvas) {
-        SkPaint p;
-        p.setAntiAlias(true);
-
-        const SkRect rect = SkRect::MakeXYWH(8, 9, 404, 313);
-
-        canvas->save();
-
-        canvas->scale(0.5f, 0.5f);
-        canvas->translate(265, 265);
-
-        canvas->save();
-        canvas->clipRect(rect);
-        canvas->drawRect(rect, p);
-        canvas->restore();
-
-        p.setColor(SK_ColorWHITE);
-        p.setAntiAlias(false);
-        canvas->drawRect(rect, p);
-        canvas->restore();
-    }
-
-    // Horizontal remnant
-    static void draw2(SkCanvas* canvas) {
-        SkPaint p;
-        p.setAntiAlias(true);
-
-        const SkRect rect = SkRect::MakeXYWH(8, 9, 404, 313);
-
-        canvas->save();
-
-        canvas->translate(200.800003f, 172.299988f);
-        canvas->scale(0.8f, 0.8f);
-
-        canvas->save();
-        canvas->clipRect(rect);
-        canvas->drawRect(rect, p);
-        canvas->restore();
-
-        p.setColor(SK_ColorWHITE);
-        p.setAntiAlias(false);
-        canvas->drawRect(rect, p);
-        canvas->restore();
-    }
-
-    void onDraw(SkCanvas* canvas) SK_OVERRIDE {
-        draw1(canvas);
-        draw2(canvas);
-    }
-
-private:
-    typedef GM INHERITED;
-};
-
-//////////////////////////////////////////////////////////////////////////////
-
-DEF_GM(return SkNEW(ClipDrawDrawGM);)
-
-}
diff --git a/gyp/gmslides.gypi b/gyp/gmslides.gypi
index 6ee6bd7..80d7a24 100644
--- a/gyp/gmslides.gypi
+++ b/gyp/gmslides.gypi
@@ -40,7 +40,6 @@
         '../gm/blurroundrect.cpp',
         '../gm/circles.cpp',
         '../gm/circularclips.cpp',
-        '../gm/clipdrawdraw.cpp',
         '../gm/clip_strokerect.cpp',
         '../gm/clippedbitmapshaders.cpp',
         '../gm/cgms.cpp',
diff --git a/src/core/SkClipStack.cpp b/src/core/SkClipStack.cpp
index 863dc9a..515596a 100644
--- a/src/core/SkClipStack.cpp
+++ b/src/core/SkClipStack.cpp
@@ -418,6 +418,19 @@
             break;
     }
 
+    if (!fDoAA) {
+        // Here we mimic a non-anti-aliased scanline system. If there is
+        // no anti-aliasing we can integerize the bounding box to exclude
+        // fractional parts that won't be rendered.
+        // Note: the left edge is handled slightly differently below. We
+        // are a bit more generous in the rounding since we don't want to
+        // risk missing the left pixels when fLeft is very close to .5
+        fFiniteBound.set(SkScalarFloorToScalar(fFiniteBound.fLeft+0.45f),
+                         SkScalarRoundToScalar(fFiniteBound.fTop),
+                         SkScalarRoundToScalar(fFiniteBound.fRight),
+                         SkScalarRoundToScalar(fFiniteBound.fBottom));
+    }
+
     // Now determine the previous Element's bound information taking into
     // account that there may be no previous clip
     SkRect prevFinite;