Index: content/public/browser/android/compositor.h |
diff --git a/content/public/browser/android/compositor.h b/content/public/browser/android/compositor.h |
index 9019e4776ba3d7ba56a878e41ea89d858398962a..418172e49c4b2240357b8dec76fe1d44087a68ea 100644 |
--- a/content/public/browser/android/compositor.h |
+++ b/content/public/browser/android/compositor.h |
@@ -10,6 +10,12 @@ |
#include "ui/gfx/rect.h" |
#include "ui/gfx/size.h" |
+#include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h" |
+ |
+namespace gfx { |
+class JavaBitmap; |
+} |
+ |
namespace WebKit { |
class WebLayer; |
} |
@@ -48,6 +54,20 @@ class Compositor { |
virtual void OnSurfaceUpdated(const SurfacePresentedCallback& callback) = 0; |
+ // Generates an OpenGL texture and returns a texture handle. May return 0 |
+ // if the current context is lost. |
+ virtual WebKit::WebGLId GenerateTexture(gfx::JavaBitmap& bitmap) = 0; |
+ |
+ // Generates an OpenGL compressed texture and returns a texture handle. May |
+ // return 0 if the current context is lost. |
+ virtual WebKit::WebGLId GenerateCompressedTexture(gfx::Size& size, |
+ int data_size, |
+ void* data) = 0; |
+ |
+ // Deletes an OpenGL texture. Returns true if the texture could be deleted, |
+ // or false if the texture could not be deleted due to a lost context. |
no sievers
2012/10/12 22:45:56
I think it maybe be hard to guarantee without a sy
David Trainor- moved to gerrit
2012/10/15 19:01:56
Done.
|
+ virtual bool DeleteTexture(WebKit::WebGLId texture_id) = 0; |
+ |
protected: |
Compositor() {} |
}; |