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: ppapi/shared_impl/ppb_graphics_3d_shared.cc

Issue 14456004: GPU client side changes for GpuMemoryBuffers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@glapi
Patch Set: Add missing parameter in GLES2Implementation ctor in GLES2Implementation unittest Created 7 years, 7 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
« no previous file with comments | « gpu/gpu_common.gypi ('k') | ui/gl/gl.gyp » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ppb_graphics_3d_shared.h" 5 #include "ppapi/shared_impl/ppb_graphics_3d_shared.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 "gpu/command_buffer/client/transfer_buffer.h" 10 #include "gpu/command_buffer/client/transfer_buffer.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 const int32 kMinTransferBufferSize = 256 * 1024; 122 const int32 kMinTransferBufferSize = 256 * 1024;
123 const int32 kMaxTransferBufferSize = 16 * 1024 * 1024; 123 const int32 kMaxTransferBufferSize = 16 * 1024 * 1024;
124 transfer_buffer_.reset(new gpu::TransferBuffer(gles2_helper_.get())); 124 transfer_buffer_.reset(new gpu::TransferBuffer(gles2_helper_.get()));
125 125
126 // Create the object exposing the OpenGL API. 126 // Create the object exposing the OpenGL API.
127 gles2_impl_.reset(new gpu::gles2::GLES2Implementation( 127 gles2_impl_.reset(new gpu::gles2::GLES2Implementation(
128 gles2_helper_.get(), 128 gles2_helper_.get(),
129 share_gles2 ? share_gles2->share_group() : NULL, 129 share_gles2 ? share_gles2->share_group() : NULL,
130 transfer_buffer_.get(), 130 transfer_buffer_.get(),
131 false, 131 false,
132 true)); 132 true,
133 NULL // Do not use GpuMemoryBuffers.
134 ));
133 135
134 if (!gles2_impl_->Initialize( 136 if (!gles2_impl_->Initialize(
135 transfer_buffer_size, 137 transfer_buffer_size,
136 kMinTransferBufferSize, 138 kMinTransferBufferSize,
137 std::max(kMaxTransferBufferSize, transfer_buffer_size))) { 139 std::max(kMaxTransferBufferSize, transfer_buffer_size))) {
138 return false; 140 return false;
139 } 141 }
140 142
141 gles2_impl_->PushGroupMarkerEXT(0, "PPAPIContext"); 143 gles2_impl_->PushGroupMarkerEXT(0, "PPAPIContext");
142 144
(...skipping 10 matching lines...) Expand all
153 void PPB_Graphics3D_Shared::PushAlreadyLocked() { 155 void PPB_Graphics3D_Shared::PushAlreadyLocked() {
154 // Do nothing. This should be overridden in the plugin side. 156 // Do nothing. This should be overridden in the plugin side.
155 } 157 }
156 158
157 void PPB_Graphics3D_Shared::PopAlreadyLocked() { 159 void PPB_Graphics3D_Shared::PopAlreadyLocked() {
158 // Do nothing. This should be overridden in the plugin side. 160 // Do nothing. This should be overridden in the plugin side.
159 } 161 }
160 162
161 } // namespace ppapi 163 } // namespace ppapi
162 164
OLDNEW
« no previous file with comments | « gpu/gpu_common.gypi ('k') | ui/gl/gl.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698