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

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
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 } else { 206 } else {
207 DCHECK(IsValidSurface(draw)); 207 DCHECK(IsValidSurface(draw));
208 DCHECK(IsValidSurface(read)); 208 DCHECK(IsValidSurface(read));
209 DCHECK(IsValidContext(ctx)); 209 DCHECK(IsValidContext(ctx));
210 gles2::SetGLContext(context_.get()); 210 gles2::SetGLContext(context_.get());
211 } 211 }
212 return true; 212 return true;
213 } 213 }
214 214
215 } // namespace egl 215 } // namespace egl
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698