#ifndef GPU_DEMOS_FRAMEWORK_WINDOW_H_
#define GPU_DEMOS_FRAMEWORK_WINDOW_H_
#include "base/memory/scoped_ptr.h"
#include "gpu/command_buffer/client/gles2_cmd_helper.h"
#include "gpu/command_buffer/service/command_buffer_service.h"
#include "gpu/command_buffer/service/gles2_cmd_decoder.h"
#include "gpu/command_buffer/service/gpu_scheduler.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_surface.h"
namespace gpu {
class TransferBuffer;
class TransferBufferManagerInterface;
namespace gles2 {
class GLES2Implementation;
}
namespace demos {
class Demo;
class Window {
public:
Window();
virtual ~Window();
bool Init(int width, int height);
void MainLoop();
void OnPaint();
private:
gfx::NativeWindow CreateNativeWindow(const wchar_t* title,
int width, int height);
gfx::AcceleratedWidget PluginWindow(gfx::NativeWindow hwnd);
bool CreateRenderContext(gfx::AcceleratedWidget hwnd);
gfx::NativeWindow window_handle_;
scoped_ptr<Demo> demo_;
scoped_ptr<TransferBufferManagerInterface> transfer_buffer_manager_;
scoped_ptr<gpu::CommandBufferService> command_buffer_;
scoped_ptr<gpu::GpuScheduler> gpu_scheduler_;
scoped_ptr<gpu::gles2::GLES2Decoder> decoder_;
scoped_refptr<gfx::GLContext> context_;
scoped_refptr<gfx::GLSurface> surface_;
scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_cmd_helper_;
scoped_ptr<gpu::TransferBuffer> transfer_buffer_;
scoped_ptr<gpu::gles2::GLES2Implementation> gles2_implementation_;
DISALLOW_COPY_AND_ASSIGN(Window);
};
}
}
#endif