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: gpu/gles2_conform_support/egl/display.cc

Issue 10106015: Allow textures to be moved from one GL context group to another. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « gpu/command_buffer_service.gypi ('k') | gpu/gpu_common.gypi » ('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_lib.h" 10 #include "gpu/command_buffer/client/gles2_lib.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 if (surface_ != NULL) { 80 if (surface_ != NULL) {
81 // We do not support more than one window surface. 81 // We do not support more than one window surface.
82 return EGL_NO_SURFACE; 82 return EGL_NO_SURFACE;
83 } 83 }
84 84
85 scoped_ptr<gpu::CommandBufferService> command_buffer( 85 scoped_ptr<gpu::CommandBufferService> command_buffer(
86 new gpu::CommandBufferService); 86 new gpu::CommandBufferService);
87 if (!command_buffer->Initialize()) 87 if (!command_buffer->Initialize())
88 return NULL; 88 return NULL;
89 89
90 gpu::gles2::ContextGroup::Ref group(new gpu::gles2::ContextGroup(true)); 90 gpu::gles2::ContextGroup::Ref group(new gpu::gles2::ContextGroup(NULL, true));
91 91
92 decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get())); 92 decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get()));
93 if (!decoder_.get()) 93 if (!decoder_.get())
94 return EGL_NO_SURFACE; 94 return EGL_NO_SURFACE;
95 95
96 gpu_scheduler_.reset(new gpu::GpuScheduler(command_buffer.get(), 96 gpu_scheduler_.reset(new gpu::GpuScheduler(command_buffer.get(),
97 decoder_.get(), 97 decoder_.get(),
98 NULL)); 98 NULL));
99 99
100 decoder_->set_engine(gpu_scheduler_.get()); 100 decoder_->set_engine(gpu_scheduler_.get());
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 } else { 207 } else {
208 DCHECK(IsValidSurface(draw)); 208 DCHECK(IsValidSurface(draw));
209 DCHECK(IsValidSurface(read)); 209 DCHECK(IsValidSurface(read));
210 DCHECK(IsValidContext(ctx)); 210 DCHECK(IsValidContext(ctx));
211 gles2::SetGLContext(context_.get()); 211 gles2::SetGLContext(context_.get());
212 } 212 }
213 return true; 213 return true;
214 } 214 }
215 215
216 } // namespace egl 216 } // namespace egl
OLDNEW
« no previous file with comments | « gpu/command_buffer_service.gypi ('k') | gpu/gpu_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698