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

Unified Diff: android_webview/browser/aw_gl_surface.h

Issue 22277004: Add gfx::SurfaceFactoryWebview (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: InProcessContext takes attrib struct Created 7 years, 4 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: android_webview/browser/aw_gl_surface.h
diff --git a/android_webview/browser/aw_gl_surface.h b/android_webview/browser/aw_gl_surface.h
new file mode 100644
index 0000000000000000000000000000000000000000..c18a083834d464078f58db8e092c40a63bf0f27d
--- /dev/null
+++ b/android_webview/browser/aw_gl_surface.h
@@ -0,0 +1,42 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ANDROID_WEBVIEW_BROWSER_AW_GL_SURFACE_H_
+#define ANDROID_WEBVIEW_BROWSER_AW_GL_SURFACE_H_
+
+#include "ui/gl/gl_surface.h"
+
+namespace android_webview {
+
+// This surface is used to represent the underlying surface provided by the App
+// inside a hardware draw. Note that offscreen contexts will not be using this
+// GLSurface.
+class GL_EXPORT AwGLSurface : public gfx::GLSurface {
+ public:
+ AwGLSurface();
+
+ // Implement GLSurface.
+ virtual void Destroy() OVERRIDE;
+ virtual bool IsOffscreen() OVERRIDE;
+ virtual unsigned int GetBackingFrameBufferObject() OVERRIDE;
+ virtual bool SwapBuffers() OVERRIDE;
+ virtual gfx::Size GetSize() OVERRIDE;
+ virtual void* GetHandle() OVERRIDE;
+ virtual void* GetDisplay() OVERRIDE;
+
+ void SetBackingFrameBufferObject(unsigned int fbo);
+ void ResetBackingFrameBufferObject();
+
+ protected:
+ virtual ~AwGLSurface();
+
+ private:
+ unsigned int fbo_;
+
+ DISALLOW_COPY_AND_ASSIGN(AwGLSurface);
+};
+
+} // namespace android_webview
+
+#endif // ANDROID_WEBVIEW_BROWSER_AW_GL_SURFACE_H_

Powered by Google App Engine
This is Rietveld 408576698