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

Side by Side Diff: gpu/gles2_conform_support/egl/display.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/command_buffer/tests/gl_manager.cc ('k') | gpu/gpu.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 "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_implementation.h" 10 #include "gpu/command_buffer/client/gles2_implementation.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 return EGL_NO_CONTEXT; 223 return EGL_NO_CONTEXT;
224 224
225 DCHECK(command_buffer_ != NULL); 225 DCHECK(command_buffer_ != NULL);
226 DCHECK(transfer_buffer_.get()); 226 DCHECK(transfer_buffer_.get());
227 bool share_resources = share_ctx != NULL; 227 bool share_resources = share_ctx != NULL;
228 context_.reset(new gpu::gles2::GLES2Implementation( 228 context_.reset(new gpu::gles2::GLES2Implementation(
229 gles2_cmd_helper_.get(), 229 gles2_cmd_helper_.get(),
230 NULL, 230 NULL,
231 transfer_buffer_.get(), 231 transfer_buffer_.get(),
232 share_resources, 232 share_resources,
233 true)); 233 true,
234 NULL));
234 235
235 if (!context_->Initialize( 236 if (!context_->Initialize(
236 kTransferBufferSize, 237 kTransferBufferSize,
237 kTransferBufferSize / 2, 238 kTransferBufferSize / 2,
238 kTransferBufferSize * 2)) { 239 kTransferBufferSize * 2)) {
239 return EGL_NO_CONTEXT; 240 return EGL_NO_CONTEXT;
240 } 241 }
241 242
242 context_->EnableFeatureCHROMIUM("pepper3d_allow_buffers_on_multiple_targets"); 243 context_->EnableFeatureCHROMIUM("pepper3d_allow_buffers_on_multiple_targets");
243 context_->EnableFeatureCHROMIUM("pepper3d_support_fixed_attribs"); 244 context_->EnableFeatureCHROMIUM("pepper3d_support_fixed_attribs");
(...skipping 13 matching lines...) Expand all
257 } else { 258 } else {
258 DCHECK(IsValidSurface(draw)); 259 DCHECK(IsValidSurface(draw));
259 DCHECK(IsValidSurface(read)); 260 DCHECK(IsValidSurface(read));
260 DCHECK(IsValidContext(ctx)); 261 DCHECK(IsValidContext(ctx));
261 gles2::SetGLContext(context_.get()); 262 gles2::SetGLContext(context_.get());
262 } 263 }
263 return true; 264 return true;
264 } 265 }
265 266
266 } // namespace egl 267 } // namespace egl
OLDNEW
« no previous file with comments | « gpu/command_buffer/tests/gl_manager.cc ('k') | gpu/gpu.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698