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

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

Issue 16293004: Update gpu/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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/config/gpu_info_collector.cc ('k') | no next file » | 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_implementation.h" 10 #include "gpu/command_buffer/client/gles2_implementation.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } 135 }
136 if (!gl_surface_.get()) 136 if (!gl_surface_.get())
137 return EGL_NO_SURFACE; 137 return EGL_NO_SURFACE;
138 138
139 gl_context_ = gfx::GLContext::CreateGLContext(NULL, 139 gl_context_ = gfx::GLContext::CreateGLContext(NULL,
140 gl_surface_.get(), 140 gl_surface_.get(),
141 gfx::PreferDiscreteGpu); 141 gfx::PreferDiscreteGpu);
142 if (!gl_context_.get()) 142 if (!gl_context_.get())
143 return EGL_NO_SURFACE; 143 return EGL_NO_SURFACE;
144 144
145 gl_context_->MakeCurrent(gl_surface_); 145 gl_context_->MakeCurrent(gl_surface_.get());
146 146
147 EGLint depth_size = 0; 147 EGLint depth_size = 0;
148 EGLint alpha_size = 0; 148 EGLint alpha_size = 0;
149 EGLint stencil_size = 0; 149 EGLint stencil_size = 0;
150 GetConfigAttrib(config, EGL_DEPTH_SIZE, &depth_size); 150 GetConfigAttrib(config, EGL_DEPTH_SIZE, &depth_size);
151 GetConfigAttrib(config, EGL_ALPHA_SIZE, &alpha_size); 151 GetConfigAttrib(config, EGL_ALPHA_SIZE, &alpha_size);
152 GetConfigAttrib(config, EGL_STENCIL_SIZE, &stencil_size); 152 GetConfigAttrib(config, EGL_STENCIL_SIZE, &stencil_size);
153 std::vector<int32> attribs; 153 std::vector<int32> attribs;
154 attribs.push_back(EGL_DEPTH_SIZE); 154 attribs.push_back(EGL_DEPTH_SIZE);
155 attribs.push_back(depth_size); 155 attribs.push_back(depth_size);
(...skipping 102 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/config/gpu_info_collector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698