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

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

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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/service/vertex_attrib_manager.cc ('k') | ipc/ipc_sync_message_filter.cc » ('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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 136 }
137 if (!gl_surface_.get()) 137 if (!gl_surface_.get())
138 return EGL_NO_SURFACE; 138 return EGL_NO_SURFACE;
139 139
140 gl_context_ = gfx::GLContext::CreateGLContext(NULL, 140 gl_context_ = gfx::GLContext::CreateGLContext(NULL,
141 gl_surface_.get(), 141 gl_surface_.get(),
142 gfx::PreferDiscreteGpu); 142 gfx::PreferDiscreteGpu);
143 if (!gl_context_.get()) 143 if (!gl_context_.get())
144 return EGL_NO_SURFACE; 144 return EGL_NO_SURFACE;
145 145
146 gl_context_->MakeCurrent(gl_surface_); 146 gl_context_->MakeCurrent(gl_surface_.get());
147 147
148 EGLint depth_size = 0; 148 EGLint depth_size = 0;
149 EGLint alpha_size = 0; 149 EGLint alpha_size = 0;
150 EGLint stencil_size = 0; 150 EGLint stencil_size = 0;
151 GetConfigAttrib(config, EGL_DEPTH_SIZE, &depth_size); 151 GetConfigAttrib(config, EGL_DEPTH_SIZE, &depth_size);
152 GetConfigAttrib(config, EGL_ALPHA_SIZE, &alpha_size); 152 GetConfigAttrib(config, EGL_ALPHA_SIZE, &alpha_size);
153 GetConfigAttrib(config, EGL_STENCIL_SIZE, &stencil_size); 153 GetConfigAttrib(config, EGL_STENCIL_SIZE, &stencil_size);
154 std::vector<int32> attribs; 154 std::vector<int32> attribs;
155 attribs.push_back(EGL_DEPTH_SIZE); 155 attribs.push_back(EGL_DEPTH_SIZE);
156 attribs.push_back(depth_size); 156 attribs.push_back(depth_size);
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 } else { 258 } else {
259 DCHECK(IsValidSurface(draw)); 259 DCHECK(IsValidSurface(draw));
260 DCHECK(IsValidSurface(read)); 260 DCHECK(IsValidSurface(read));
261 DCHECK(IsValidContext(ctx)); 261 DCHECK(IsValidContext(ctx));
262 gles2::SetGLContext(context_.get()); 262 gles2::SetGLContext(context_.get());
263 } 263 }
264 return true; 264 return true;
265 } 265 }
266 266
267 } // namespace egl 267 } // namespace egl
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/vertex_attrib_manager.cc ('k') | ipc/ipc_sync_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698