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

Unified Diff: gpu/command_buffer/client/gles2_demo.cc

Issue 367002: Added Pepper 3D render context that instantiates the GPU plugin.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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/client/gles2_cmd_helper.h ('k') | gpu/command_buffer/client/gles2_implementation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/gles2_demo.cc
===================================================================
--- gpu/command_buffer/client/gles2_demo.cc (revision 35153)
+++ gpu/command_buffer/client/gles2_demo.cc (working copy)
@@ -25,6 +25,7 @@
#include "gpu/command_buffer/client/gles2_demo_cc.h"
using base::SharedMemory;
+using gpu::Buffer;
using gpu::GPUProcessor;
using gpu::CommandBufferService;
using gpu::gles2::GLES2CmdHelper;
@@ -45,9 +46,8 @@
bool GLES2Demo::Setup(void* hwnd, int32 size) {
scoped_ptr<CommandBufferService> command_buffer(new CommandBufferService);
- if (!command_buffer->Initialize(size)) {
+ if (!command_buffer->Initialize(size))
return NULL;
- }
scoped_refptr<GPUProcessor> gpu_processor(
new GPUProcessor(command_buffer.get()));
@@ -67,19 +67,15 @@
size_t transfer_buffer_size = 512 * 1024;
int32 transfer_buffer_id =
command_buffer->CreateTransferBuffer(transfer_buffer_size);
- ::base::SharedMemory* shared_memory =
+ Buffer transfer_buffer =
command_buffer->GetTransferBuffer(transfer_buffer_id);
- if (!shared_memory->Map(transfer_buffer_size)) {
+ if (!transfer_buffer.ptr)
return false;
- }
- void* transfer_buffer = shared_memory->memory();
- if (!transfer_buffer) {
- return false;
- }
+
gles2::g_gl_impl = new GLES2Implementation(helper,
- transfer_buffer_size,
- transfer_buffer,
+ transfer_buffer.size,
+ transfer_buffer.ptr,
transfer_buffer_id);
return command_buffer.release() != NULL;
« no previous file with comments | « gpu/command_buffer/client/gles2_cmd_helper.h ('k') | gpu/command_buffer/client/gles2_implementation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698