Update Animation Plugin to use OpenGL.

Change-Id: Ib20fa69422a0dae804c95f71b70a65027ad8e9cf
diff --git a/samples/BrowserPlugin/jni/animation/AnimationPlugin.h b/samples/BrowserPlugin/jni/animation/AnimationPlugin.h
index 4a5b4e8..870b67c 100644
--- a/samples/BrowserPlugin/jni/animation/AnimationPlugin.h
+++ b/samples/BrowserPlugin/jni/animation/AnimationPlugin.h
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008, The Android Open Source Project
+ * Copyright 2010, The Android Open Source Project
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -24,29 +24,25 @@
  */
 
 #include "PluginObject.h"
+#include "AnimationThread.h"
 
 #ifndef pluginGraphics__DEFINED
 #define pluginGraphics__DEFINED
 
-class BallAnimation : public SubPlugin {
+class BallAnimation : public SurfaceSubPlugin {
 public:
     BallAnimation(NPP inst);
     virtual ~BallAnimation();
     virtual bool supportsDrawingModel(ANPDrawingModel);
     virtual int16_t handleEvent(const ANPEvent* evt);
+
+    virtual jobject getSurface();
 private:
-    void drawPlugin(const ANPBitmap& bitmap, const ANPRectI& clip);
     void showEntirePluginOnScreen();
+    void destroySurface();
 
-    float m_x;
-    float m_y;
-    float m_dx;
-    float m_dy;
-
-    ANPRectF    m_oval;
-    ANPPaint*   m_paint;
-
-    static const float SCALE = 0.1;
+    jobject          m_surface;
+    AnimationThread* m_renderingThread;
 };
 
 #endif // pluginGraphics__DEFINED