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

Side by Side Diff: gpu/gles2_conform_support/egl/display.cc

Issue 8919014: Revert "Revert 113479 - Revert "Revert 113250 - Add CommandBuffer::SetGetBuffer"" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gpu/demos/framework/window.cc ('k') | ppapi/c/trusted/ppb_graphics_3d_trusted.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) 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 #include "gpu/gles2_conform_support/egl/display.h" 5 #include "gpu/gles2_conform_support/egl/display.h"
6 6
7 #include <vector> 7 #include <vector>
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "gpu/command_buffer/client/gles2_lib.h" 10 #include "gpu/command_buffer/client/gles2_lib.h"
(...skipping 14 matching lines...) Expand all
25 transfer_buffer_id_(-1) { 25 transfer_buffer_id_(-1) {
26 } 26 }
27 27
28 Display::~Display() { 28 Display::~Display() {
29 gles2::Terminate(); 29 gles2::Terminate();
30 } 30 }
31 31
32 bool Display::Initialize() { 32 bool Display::Initialize() {
33 scoped_ptr<gpu::CommandBufferService> command_buffer( 33 scoped_ptr<gpu::CommandBufferService> command_buffer(
34 new gpu::CommandBufferService); 34 new gpu::CommandBufferService);
35 if (!command_buffer->Initialize(kCommandBufferSize)) 35 if (!command_buffer->Initialize())
36 return false; 36 return false;
37 37
38 int32 transfer_buffer_id = 38 int32 transfer_buffer_id =
39 command_buffer->CreateTransferBuffer(kTransferBufferSize, -1); 39 command_buffer->CreateTransferBuffer(kTransferBufferSize, -1);
40 gpu::Buffer transfer_buffer = 40 gpu::Buffer transfer_buffer =
41 command_buffer->GetTransferBuffer(transfer_buffer_id); 41 command_buffer->GetTransferBuffer(transfer_buffer_id);
42 if (transfer_buffer.ptr == NULL) 42 if (transfer_buffer.ptr == NULL)
43 return false; 43 return false;
44 44
45 scoped_ptr<gpu::gles2::GLES2CmdHelper> cmd_helper( 45 scoped_ptr<gpu::gles2::GLES2CmdHelper> cmd_helper(
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 } else { 200 } else {
201 DCHECK(IsValidSurface(draw)); 201 DCHECK(IsValidSurface(draw));
202 DCHECK(IsValidSurface(read)); 202 DCHECK(IsValidSurface(read));
203 DCHECK(IsValidContext(ctx)); 203 DCHECK(IsValidContext(ctx));
204 gles2::SetGLContext(context_.get()); 204 gles2::SetGLContext(context_.get());
205 } 205 }
206 return true; 206 return true;
207 } 207 }
208 208
209 } // namespace egl 209 } // namespace egl
OLDNEW
« no previous file with comments | « gpu/demos/framework/window.cc ('k') | ppapi/c/trusted/ppb_graphics_3d_trusted.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698