Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(584)

Unified Diff: content/public/browser/android/compositor.h

Issue 11090075: Expose the WebGraphicsContext3D for Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Expose destroy/create texture methods instead of the context Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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() {}
};

Powered by Google App Engine
This is Rietveld 408576698