summaryrefslogtreecommitdiffstats
path: root/gpu/demos/framework/window.h
diff options
context:
space:
mode:
authoralokp@chromium.org <alokp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-03 17:02:27 +0000
committeralokp@chromium.org <alokp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-03 17:02:27 +0000
commit84352455e708fc771809f34476d4db9ca79e4bc9 (patch)
treeb47b875ea7ade05db1d924ddc48f1c8f3c6f97ea /gpu/demos/framework/window.h
parent882f0ccbf250af3ff242da94706f26bb2f09c5b0 (diff)
downloadchromium_src-84352455e708fc771809f34476d4db9ca79e4bc9.zip
chromium_src-84352455e708fc771809f34476d4db9ca79e4bc9.tar.gz
chromium_src-84352455e708fc771809f34476d4db9ca79e4bc9.tar.bz2
Changes necessary to compile gpu demos on linux. It is not functional yet just compiling.
BUG=26099 Review URL: http://codereview.chromium.org/552240 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37977 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/demos/framework/window.h')
-rw-r--r--gpu/demos/framework/window.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/gpu/demos/framework/window.h b/gpu/demos/framework/window.h
index dade945..a84ecf8 100644
--- a/gpu/demos/framework/window.h
+++ b/gpu/demos/framework/window.h
@@ -5,13 +5,14 @@
#ifndef GPU_DEMOS_FRAMEWORK_WINDOW_H_
#define GPU_DEMOS_FRAMEWORK_WINDOW_H_
+#include "app/gfx/native_widget_types.h"
#include "base/scoped_ptr.h"
-#include "gpu/demos/framework/demo.h"
-#include "gpu/demos/framework/platform.h"
namespace gpu {
namespace demos {
+class Demo;
+
// Acts as a framework for standalone demos. It creates a window and delegates
// all events to demo to perform rendering and other tasks.
class Window {
@@ -28,7 +29,15 @@ class Window {
void OnPaint();
private:
- NativeWindowHandle window_handle_;
+ // Creates and shows a native window with the given title and dimensions.
+ gfx::NativeWindow CreateNativeWindow(const wchar_t* title,
+ int width, int height);
+ // Converts native window handle to NPAPI plugin window handle.
+ gfx::PluginWindowHandle PluginWindow(gfx::NativeWindow hwnd);
+ // Creates an OpenGL ES 2.0 rendering context for the given window.
+ bool CreateRenderContext(gfx::PluginWindowHandle hwnd);
+
+ gfx::NativeWindow window_handle_;
scoped_ptr<Demo> demo_;
DISALLOW_COPY_AND_ASSIGN(Window);
@@ -37,3 +46,4 @@ class Window {
} // namespace demos
} // namespace gpu
#endif // GPU_DEMOS_FRAMEWORK_WINDOW_H_
+