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

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

Issue 10048006: Merge 131559 - Revert 131177 - aura: Change shared context to be offscreen for arm (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1097/src/
Patch Set: 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(),
116 gfx::Size(), 115 gfx::Size(),
117 gpu::gles2::DisallowedFeatures(), 116 gpu::gles2::DisallowedFeatures(),
118 NULL, 117 NULL,
119 attribs)) { 118 attribs)) {
120 return EGL_NO_SURFACE; 119 return EGL_NO_SURFACE;
121 } 120 }
122 121
123 command_buffer->SetPutOffsetChangeCallback( 122 command_buffer->SetPutOffsetChangeCallback(
124 base::Bind(&gpu::GpuScheduler::PutChanged, 123 base::Bind(&gpu::GpuScheduler::PutChanged,
125 base::Unretained(gpu_scheduler_.get()))); 124 base::Unretained(gpu_scheduler_.get())));
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 } else { 206 } else {
208 DCHECK(IsValidSurface(draw)); 207 DCHECK(IsValidSurface(draw));
209 DCHECK(IsValidSurface(read)); 208 DCHECK(IsValidSurface(read));
210 DCHECK(IsValidContext(ctx)); 209 DCHECK(IsValidContext(ctx));
211 gles2::SetGLContext(context_.get()); 210 gles2::SetGLContext(context_.get());
212 } 211 }
213 return true; 212 return true;
214 } 213 }
215 214
216 } // namespace egl 215 } // 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