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

Unified Diff: gpu/demos/framework/window.cc

Issue 1136006: Calling OpenGL from the renderer process. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 | « gpu/command_buffer/service/texture_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/demos/framework/window.cc
===================================================================
--- gpu/demos/framework/window.cc (revision 42644)
+++ gpu/demos/framework/window.cc (working copy)
@@ -50,20 +50,23 @@
::gles2::GetGLContext()->SwapBuffers();
}
+// TODO(apatrick): It looks like all the resources allocated here leak. We
+// should fix that if we want to use this Window class for anything beyond this
+// simple use case.
bool Window::CreateRenderContext(gfx::PluginWindowHandle hwnd) {
scoped_ptr<CommandBufferService> command_buffer(new CommandBufferService);
if (!command_buffer->Initialize(kCommandBufferSize)) {
return false;
}
- scoped_refptr<GPUProcessor> gpu_processor(
+ GPUProcessor* gpu_processor(
new GPUProcessor(command_buffer.get()));
- if (!gpu_processor->Initialize(hwnd)) {
+ if (!gpu_processor->Initialize(hwnd, NULL, gfx::Size(), 0)) {
return false;
}
command_buffer->SetPutOffsetChangeCallback(
- NewCallback(gpu_processor.get(), &GPUProcessor::ProcessCommands));
+ NewCallback(gpu_processor, &GPUProcessor::ProcessCommands));
GLES2CmdHelper* helper = new GLES2CmdHelper(command_buffer.get());
if (!helper->Initialize()) {
« no previous file with comments | « gpu/command_buffer/service/texture_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698