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

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

Issue 7458010: Revert 93066 - Execute all GL commands up to the put offset reported by a each flush.This means g... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 }; 49 };
50 50
51 GLES2Demo::GLES2Demo() { 51 GLES2Demo::GLES2Demo() {
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 GpuScheduler* gpu_scheduler = GpuScheduler::Create(command_buffer.get(), 59 GpuScheduler* gpu_scheduler = new GpuScheduler(command_buffer.get(),
60 NULL, 60 NULL,
61 NULL); 61 NULL);
62 if (!gpu_scheduler->Initialize(reinterpret_cast<HWND>(hwnd), 62 if (!gpu_scheduler->Initialize(reinterpret_cast<HWND>(hwnd),
63 gfx::Size(), 63 gfx::Size(),
64 gpu::gles2::DisallowedExtensions(), 64 gpu::gles2::DisallowedExtensions(),
65 NULL, 65 NULL,
66 std::vector<int32>(), 66 std::vector<int32>(),
67 NULL)) { 67 NULL)) {
68 return NULL; 68 return NULL;
69 } 69 }
70 70
71 command_buffer->SetPutOffsetChangeCallback( 71 command_buffer->SetPutOffsetChangeCallback(
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 ::fprintf(stdout, "Could not setup window.\n"); 222 ::fprintf(stdout, "Could not setup window.\n");
223 return EXIT_FAILURE; 223 return EXIT_FAILURE;
224 } 224 }
225 225
226 demo->Setup(hwnd, kCommandBufferSize); 226 demo->Setup(hwnd, kCommandBufferSize);
227 227
228 ProcessMessages(hwnd); 228 ProcessMessages(hwnd);
229 229
230 return EXIT_SUCCESS; 230 return EXIT_SUCCESS;
231 } 231 }
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_cmd_helper_autogen.h ('k') | gpu/command_buffer/client/gles2_implementation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698