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

Side by Side Diff: gpu/command_buffer/client/gles2_demo.cc

Issue 6623063: Connect up --disable-gl-multisampling to command buffer (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fix style. Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/gpu_process_host.cc ('k') | gpu/command_buffer/service/context_group.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file implements a standalone executable demo of using GLES2 over 5 // This file implements a standalone executable demo of using GLES2 over
6 // command buffers. This code is temporary as the setup that happens 6 // command buffers. This code is temporary as the setup that happens
7 // here is in a state of flux. Eventually there will be several versions of 7 // here is in a state of flux. Eventually there will be several versions of
8 // setup, one for trusted code, one for pepper, one for NaCl, and maybe others. 8 // setup, one for trusted code, one for pepper, one for NaCl, and maybe others.
9 9
10 #include <windows.h> 10 #include <windows.h>
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 52 }
53 53
54 bool GLES2Demo::Setup(void* hwnd, int32 size) { 54 bool GLES2Demo::Setup(void* hwnd, int32 size) {
55 scoped_ptr<CommandBufferService> command_buffer(new CommandBufferService); 55 scoped_ptr<CommandBufferService> command_buffer(new CommandBufferService);
56 if (!command_buffer->Initialize(size)) 56 if (!command_buffer->Initialize(size))
57 return NULL; 57 return NULL;
58 58
59 GPUProcessor* gpu_processor = new GPUProcessor(command_buffer.get(), NULL); 59 GPUProcessor* gpu_processor = new GPUProcessor(command_buffer.get(), NULL);
60 if (!gpu_processor->Initialize(reinterpret_cast<HWND>(hwnd), 60 if (!gpu_processor->Initialize(reinterpret_cast<HWND>(hwnd),
61 gfx::Size(), 61 gfx::Size(),
62 gpu::gles2::DisallowedExtensions(),
62 NULL, 63 NULL,
63 std::vector<int32>(), 64 std::vector<int32>(),
64 NULL, 65 NULL,
65 0)) { 66 0)) {
66 return NULL; 67 return NULL;
67 } 68 }
68 69
69 command_buffer->SetPutOffsetChangeCallback( 70 command_buffer->SetPutOffsetChangeCallback(
70 NewCallback(gpu_processor, &GPUProcessor::ProcessCommands)); 71 NewCallback(gpu_processor, &GPUProcessor::ProcessCommands));
71 72
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 ::fprintf(stdout, "Could not setup window.\n"); 221 ::fprintf(stdout, "Could not setup window.\n");
221 return EXIT_FAILURE; 222 return EXIT_FAILURE;
222 } 223 }
223 224
224 demo->Setup(hwnd, kCommandBufferSize); 225 demo->Setup(hwnd, kCommandBufferSize);
225 226
226 ProcessMessages(hwnd); 227 ProcessMessages(hwnd);
227 228
228 return EXIT_SUCCESS; 229 return EXIT_SUCCESS;
229 } 230 }
OLDNEW
« no previous file with comments | « content/browser/gpu_process_host.cc ('k') | gpu/command_buffer/service/context_group.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698