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

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

Issue 7762009: Manually merging trunk revs 95836 and 96904 to 835 branch (second attempt) (Closed) Base URL: svn://svn.chromium.org/chrome/branches/835/src/
Patch Set: 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 command_buffer->GetTransferBuffer(transfer_buffer_id_); 76 command_buffer->GetTransferBuffer(transfer_buffer_id_);
77 if (!transfer_buffer.ptr) 77 if (!transfer_buffer.ptr)
78 return false; 78 return false;
79 79
80 // Create the object exposing the OpenGL API. 80 // Create the object exposing the OpenGL API.
81 gles2_impl_.reset(new gpu::gles2::GLES2Implementation( 81 gles2_impl_.reset(new gpu::gles2::GLES2Implementation(
82 gles2_helper_.get(), 82 gles2_helper_.get(),
83 transfer_buffer.size, 83 transfer_buffer.size,
84 transfer_buffer.ptr, 84 transfer_buffer.ptr,
85 transfer_buffer_id_, 85 transfer_buffer_id_,
86 false)); 86 false,
87 true));
87 88
88 return true; 89 return true;
89 } 90 }
90 91
91 void Graphics3DImpl::DestroyGLES2Impl() { 92 void Graphics3DImpl::DestroyGLES2Impl() {
92 gles2_impl_.reset(); 93 gles2_impl_.reset();
93 94
94 if (transfer_buffer_id_ != -1) { 95 if (transfer_buffer_id_ != -1) {
95 gpu::CommandBuffer* command_buffer = GetCommandBuffer(); 96 gpu::CommandBuffer* command_buffer = GetCommandBuffer();
96 DCHECK(command_buffer); 97 DCHECK(command_buffer);
97 command_buffer->DestroyTransferBuffer(transfer_buffer_id_); 98 command_buffer->DestroyTransferBuffer(transfer_buffer_id_);
98 transfer_buffer_id_ = -1; 99 transfer_buffer_id_ = -1;
99 } 100 }
100 101
101 gles2_helper_.reset(); 102 gles2_helper_.reset();
102 } 103 }
103 104
104 } // namespace ppapi 105 } // namespace ppapi
105 106
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