Make SkGPipe use SkBitmapHeap.

In the single process (or hypothetical cross process/shared address
space) mode, SkGPipe now uses SkBitmapHeap instead of SharedHeap.

Still need to use the shared heap for shaders as well as for cross
process.

TEST=PipeTest

Review URL: https://codereview.appspot.com/6461059

git-svn-id: http://skia.googlecode.com/svn/trunk@5008 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/PipeTest.cpp b/tests/PipeTest.cpp
new file mode 100644
index 0000000..3724223
--- /dev/null
+++ b/tests/PipeTest.cpp
@@ -0,0 +1,35 @@
+
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "SamplePipeControllers.h"
+#include "SkBitmap.h"
+#include "SkCanvas.h"
+#include "SkGPipe.h"
+#include "Test.h"
+
+// Ensures that the pipe gracefully handles drawing an invalid bitmap.
+static void testDrawingBadBitmap(skiatest::Reporter* reporter, SkCanvas* pipeCanvas) {
+    SkBitmap badBitmap;
+    badBitmap.setConfig(SkBitmap::kNo_Config, 5, 5);
+    pipeCanvas->drawBitmap(badBitmap, 0, 0);
+}
+
+static void test_pipeTests(skiatest::Reporter* reporter) {
+    SkBitmap bitmap;
+    bitmap.setConfig(SkBitmap::kARGB_8888_Config, 64, 64);
+    SkCanvas canvas(bitmap);
+
+    PipeController pipeController(&canvas);
+    SkGPipeWriter writer;
+    SkCanvas* pipeCanvas = writer.startRecording(&pipeController);
+    testDrawingBadBitmap(reporter, pipeCanvas);
+    writer.endRecording();
+}
+
+#include "TestClassDef.h"
+DEFINE_TESTCLASS("PipeTest", PipeTestClass, test_pipeTests)