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

Unified Diff: content/browser/android/graphics_context.h

Issue 10828356: Very basic Android browser-side compositing support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
« no previous file with comments | « no previous file | content/browser/android/graphics_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/graphics_context.h
diff --git a/content/browser/android/graphics_context.h b/content/browser/android/graphics_context.h
new file mode 100644
index 0000000000000000000000000000000000000000..d84ee2f6a589354e74fceec329ff64197c66c209
--- /dev/null
+++ b/content/browser/android/graphics_context.h
@@ -0,0 +1,47 @@
+// Copyright (c) 2012 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 CONTENT_BROWSER_ANDROID_GRAPHICS_CONTEXT_H_
+#define CONTENT_BROWSER_ANDROID_GRAPHICS_CONTEXT_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "ui/gfx/native_widget_types.h"
+
+class WebGraphicsContext3DCommandBufferImpl;
+struct ANativeWindow;
+
+namespace WebKit {
+class WebGraphicsContext3D;
+}
+
+namespace content {
+
+class GraphicsContext {
+ public:
+ ~GraphicsContext();
+
+ // Create and returns a graphics context on the caller's thread and
+ // also creates an image transport surface associated with the given
+ // parent window.
+ static GraphicsContext* CreateForUI(ANativeWindow* ui_window);
+
+ uint32 InsertSyncPoint();
+ int GetSurfaceID();
+
+ private:
+ GraphicsContext(WebGraphicsContext3DCommandBufferImpl* context,
+ int surface_id,
+ ANativeWindow* window,
+ int texture_id1,
+ int texture_id2);
+
+ scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context_;
+ int surface_id_;
+ ANativeWindow* window_;
+ int texture_id_[2];
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_ANDROID_GRAPHICS_CONTEXT_H_
« no previous file with comments | « no previous file | content/browser/android/graphics_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698