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

Side by Side Diff: gpu/gles2_conform_support/egl/display.cc

Issue 10007034: aura: Change shared context to be offscreen for arm (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 8 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 gl_context_ = gfx::GLContext::CreateGLContext(NULL, 106 gl_context_ = gfx::GLContext::CreateGLContext(NULL,
107 gl_surface_.get(), 107 gl_surface_.get(),
108 gfx::PreferDiscreteGpu); 108 gfx::PreferDiscreteGpu);
109 if (!gl_context_.get()) 109 if (!gl_context_.get())
110 return EGL_NO_SURFACE; 110 return EGL_NO_SURFACE;
111 111
112 std::vector<int32> attribs; 112 std::vector<int32> attribs;
113 if (!decoder_->Initialize(gl_surface_.get(), 113 if (!decoder_->Initialize(gl_surface_.get(),
114 gl_context_.get(), 114 gl_context_.get(),
115 gl_surface_->IsOffscreen(),
115 gfx::Size(), 116 gfx::Size(),
116 gpu::gles2::DisallowedFeatures(), 117 gpu::gles2::DisallowedFeatures(),
117 NULL, 118 NULL,
118 attribs)) { 119 attribs)) {
119 return EGL_NO_SURFACE; 120 return EGL_NO_SURFACE;
120 } 121 }
121 122
122 command_buffer->SetPutOffsetChangeCallback( 123 command_buffer->SetPutOffsetChangeCallback(
123 base::Bind(&gpu::GpuScheduler::PutChanged, 124 base::Bind(&gpu::GpuScheduler::PutChanged,
124 base::Unretained(gpu_scheduler_.get()))); 125 base::Unretained(gpu_scheduler_.get())));
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 } else { 207 } else {
207 DCHECK(IsValidSurface(draw)); 208 DCHECK(IsValidSurface(draw));
208 DCHECK(IsValidSurface(read)); 209 DCHECK(IsValidSurface(read));
209 DCHECK(IsValidContext(ctx)); 210 DCHECK(IsValidContext(ctx));
210 gles2::SetGLContext(context_.get()); 211 gles2::SetGLContext(context_.get());
211 } 212 }
212 return true; 213 return true;
213 } 214 }
214 215
215 } // namespace egl 216 } // namespace egl
OLDNEW
« no previous file with comments | « gpu/demos/framework/window.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