remove SkThreadedBMPDevice and friends

It is unused, is becoming a maintainence burden and source of bugs,
and takes up a lot of time on the *SAN bots.

Change-Id: If383eb6e4838ca23140f9e16d518b1bfc655fa12
Reviewed-on: https://skia-review.googlesource.com/143307
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index d3f7ab6..6ba5962 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -56,11 +56,11 @@
 #include "SkRecordDraw.h"
 #include "SkRecorder.h"
 #include "SkStream.h"
+#include "SkSurface.h"
 #include "SkSurfaceCharacterization.h"
 #include "SkSwizzler.h"
 #include "SkTLogic.h"
 #include "SkTaskGroup.h"
-#include "SkThreadedBMPDevice.h"
 #if defined(SK_BUILD_FOR_WIN)
     #include "SkAutoCoInitialize.h"
     #include "SkHRESULT.h"
@@ -1804,7 +1804,7 @@
     : fColorType(colorType)
     , fColorSpace(std::move(colorSpace)) {}
 
-void RasterSink::allocPixels(const Src& src, SkBitmap* dst) const {
+Error RasterSink::draw(const Src& src, SkBitmap* dst, SkWStream*, SkString*) const {
     const SkISize size = src.size();
     // If there's an appropriate alpha type for this color type, use it, otherwise use premul.
     SkAlphaType alphaType = kPremul_SkAlphaType;
@@ -1813,42 +1813,13 @@
     dst->allocPixelsFlags(SkImageInfo::Make(size.width(), size.height(),
                                             fColorType, alphaType, fColorSpace),
                           SkBitmap::kZeroPixels_AllocFlag);
-}
 
-Error RasterSink::draw(const Src& src, SkBitmap* dst, SkWStream*, SkString*) const {
-    this->allocPixels(src, dst);
     SkCanvas canvas(*dst);
     return src.draw(&canvas);
 }
 
 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 
-ThreadedSink::ThreadedSink(SkColorType colorType, sk_sp<SkColorSpace> colorSpace)
-        : RasterSink(colorType, colorSpace) {}
-
-Error ThreadedSink::draw(const Src& src, SkBitmap* dst, SkWStream* stream, SkString* str) const {
-    this->allocPixels(src, dst);
-
-    auto canvas = skstd::make_unique<SkCanvas>(
-            sk_make_sp<SkThreadedBMPDevice>(
-                    *dst, FLAGS_backendTiles, FLAGS_backendThreads));
-    Error result = src.draw(canvas.get());
-    canvas->flush();
-    return result;
-
-    // ??? yuqian:  why does the following give me segmentation fault while the above one works?
-    //              The seg fault occurs right in the beginning of ThreadedSink::draw with invalid
-    //              memory address (it would crash without even calling this->allocPixels).
-
-    // SkThreadedBMPDevice device(*dst, tileCnt, FLAGS_cpuThreads, fExecutor.get());
-    // SkCanvas canvas(&device);
-    // Error result = src.draw(&canvas);
-    // canvas.flush();
-    // return result;
-}
-
-/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
-
 // Handy for front-patching a Src.  Do whatever up-front work you need, then call draw_to_canvas(),
 // passing the Sink draw() arguments, a size, and a function draws into an SkCanvas.
 // Several examples below.