OSDN Git Service

Merge WebKit at r71558: Initial merge by git.
[android-x86/external-webkit.git] / WebCore / platform / graphics / opengl / TextureMapperGL.h
index 7a12c72..8035abf 100644 (file)
 
 namespace WebCore {
 
+class TextureMapperGLData;
+
 // An OpenGL-ES2 implementation of TextureMapper.
 class TextureMapperGL : public TextureMapper {
 public:
-    TextureMapperGL(GraphicsContext* gc);
-    virtual ~TextureMapperGL() {}
+    TextureMapperGL();
+    virtual ~TextureMapperGL();
 
     // reimps from TextureMapper
     virtual void drawTexture(const BitmapTexture& texture, const IntRect&, const TransformationMatrix& transform, float opacity, const BitmapTexture* maskTexture);
@@ -43,11 +45,17 @@ public:
     virtual bool allowSurfaceForRoot() const { return true; }
     virtual PassRefPtr<BitmapTexture> createTexture();
     virtual const char* type() const;
-    virtual void cleanup();
+    void obtainCurrentContext();
+    bool makeContextCurrent();
+    static PassOwnPtr<TextureMapperGL> create()
+    {
+        return new TextureMapperGL;
+    }
 
 private:
-    TransformationMatrix m_projectionMatrix;
-    int m_currentProgram;
+    inline TextureMapperGLData& data() { return *m_data; }
+    TextureMapperGLData* m_data;
+    friend class BitmapTextureGL;
 };
 
 // An offscreen buffer to be rendered by software.