Remove offscreen GL support from SampleApp and SkOSWindow. This never worked anywhere but Mac and it doesn't work there anymore.


git-svn-id: http://skia.googlecode.com/svn/trunk@918 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index 5865417..3fe1f4e 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -21,10 +21,6 @@
 #define ANIMATING_EVENTTYPE "nextSample"
 #define ANIMATING_DELAY     750
 
-#if !defined(SK_BUILD_FOR_WIN32)
-//#define USE_OFFSCREEN
-#endif
-
 #ifdef SK_SUPPORT_GL
     #include "GrGLConfig.h"
 #endif
@@ -208,27 +204,20 @@
 bool SampleWindow::make3DReady() {
 
 #if defined(SK_SUPPORT_GL)
-    #if defined(USE_OFFSCREEN)
-        // first clear the raster bitmap, so we don't see any leftover bits
-        bitmap.eraseColor(0);
-        // now setup our glcanvas
-        attachGL(&bitmap);
-    #else
-        attachGL(NULL);
-    #endif
+    if (attachGL()) {
+        if (NULL == fGrContext) {
+        #if defined(SK_USE_SHADERS)
+            fGrContext = GrContext::Create(GrGpu::kOpenGL_Shaders_Engine, NULL);
+        #else
+            fGrContext = GrContext::Create(GrGpu::kOpenGL_Fixed_Engine, NULL);
+        #endif
+        }
 
-    if (NULL == fGrContext) {
-    #if defined(SK_USE_SHADERS)
-        fGrContext = GrContext::Create(GrGpu::kOpenGL_Shaders_Engine, NULL);
-    #else
-        fGrContext = GrContext::Create(GrGpu::kOpenGL_Fixed_Engine, NULL);
-    #endif
-    }
-
-    if (NULL != fGrContext) {
-        return true;
-    } else {
-        detachGL();
+        if (NULL != fGrContext) {
+            return true;
+        } else {
+            detachGL();
+        }
     }
 #endif
     SkDebugf("Failed to setup 3D");
@@ -485,9 +474,6 @@
             delete fGpuCanvas;
             fGpuCanvas = NULL;
             presentGL();
-    #ifdef USE_OFFSCREEN
-            reverseRedAndBlue(orig->getDevice()->accessBitmap(true));
-    #endif
             break;
 #endif
     }