Redelivering r3555 to re-add run-time switching between ANGLE and native opengl 

http://codereview.appspot.com/5969044/



git-svn-id: http://skia.googlecode.com/svn/trunk@3578 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/views/SkOSWindow_Win.h b/include/views/SkOSWindow_Win.h
index c857e7a..2663c8c 100644
--- a/include/views/SkOSWindow_Win.h
+++ b/include/views/SkOSWindow_Win.h
@@ -26,20 +26,19 @@
     void    updateSize();
 
     static bool PostEvent(SkEvent* evt, SkEventSinkID, SkMSec delay);
-    
-    bool attachGL();
-    void detachGL();
-    void presentGL();
 
+    enum SkBackEndTypes {
+        kNone_BackEndType,
+        kNativeGL_BackEndType,
 #if SK_ANGLE
-    bool attachANGLE();
-    void detachANGLE();
-    void presentANGLE();
+        kANGLE_BackEndType,
 #endif
+        kD3D9_BackEndType
+    };
 
-    bool attachD3D9();
-    void detachD3D9();
-    void presentD3D9();
+    bool attach(SkBackEndTypes attachType);
+    void detach();
+    void present();
 
     void* d3d9Device() { return fD3D9Device; }
 
@@ -73,13 +72,26 @@
     EGLSurface          fSurface;
 #endif
 
-    bool                fGLAttached;
-
     void*               fD3D9Device;
-    bool                fD3D9Attached;
 
     HMENU               fMBar;
 
+    SkBackEndTypes      fAttached;
+
+    bool attachGL();
+    void detachGL();
+    void presentGL();
+
+#if SK_ANGLE
+    bool attachANGLE();
+    void detachANGLE();
+    void presentANGLE();
+#endif
+
+    bool attachD3D9();
+    void detachD3D9();
+    void presentD3D9();
+
     typedef SkWindow INHERITED; 
 };