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

Side by Side Diff: ppapi/shared_impl/graphics_3d_impl.cc

Issue 7633060: Add option to not generate resources on bind in OpenGL ES (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nacl fix Created 9 years, 4 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 #include "ppapi/shared_impl/graphics_3d_impl.h" 5 #include "ppapi/shared_impl/graphics_3d_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "gpu/command_buffer/client/gles2_cmd_helper.h" 8 #include "gpu/command_buffer/client/gles2_cmd_helper.h"
9 #include "gpu/command_buffer/client/gles2_implementation.h" 9 #include "gpu/command_buffer/client/gles2_implementation.h"
10 #include "ppapi/c/pp_errors.h" 10 #include "ppapi/c/pp_errors.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 command_buffer->GetTransferBuffer(transfer_buffer_id_); 85 command_buffer->GetTransferBuffer(transfer_buffer_id_);
86 if (!transfer_buffer.ptr) 86 if (!transfer_buffer.ptr)
87 return false; 87 return false;
88 88
89 // Create the object exposing the OpenGL API. 89 // Create the object exposing the OpenGL API.
90 gles2_impl_.reset(new gpu::gles2::GLES2Implementation( 90 gles2_impl_.reset(new gpu::gles2::GLES2Implementation(
91 gles2_helper_.get(), 91 gles2_helper_.get(),
92 transfer_buffer.size, 92 transfer_buffer.size,
93 transfer_buffer.ptr, 93 transfer_buffer.ptr,
94 transfer_buffer_id_, 94 transfer_buffer_id_,
95 false)); 95 false,
96 true));
96 97
97 return true; 98 return true;
98 } 99 }
99 100
100 void Graphics3DImpl::DestroyGLES2Impl() { 101 void Graphics3DImpl::DestroyGLES2Impl() {
101 gles2_impl_.reset(); 102 gles2_impl_.reset();
102 103
103 if (transfer_buffer_id_ != -1) { 104 if (transfer_buffer_id_ != -1) {
104 gpu::CommandBuffer* command_buffer = GetCommandBuffer(); 105 gpu::CommandBuffer* command_buffer = GetCommandBuffer();
105 DCHECK(command_buffer); 106 DCHECK(command_buffer);
106 command_buffer->DestroyTransferBuffer(transfer_buffer_id_); 107 command_buffer->DestroyTransferBuffer(transfer_buffer_id_);
107 transfer_buffer_id_ = -1; 108 transfer_buffer_id_ = -1;
108 } 109 }
109 110
110 gles2_helper_.reset(); 111 gles2_helper_.reset();
111 } 112 }
112 113
113 } // namespace ppapi 114 } // namespace ppapi
114 115
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_context_3d_proxy.cc ('k') | webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698