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

Side by Side Diff: ui/gl/gl_context.cc

Issue 2037793002: Move GLContext creation from //ui/gl to //ui/gl/init. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gl_init
Patch Set: Change to scoped_refptr. Created 4 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
« no previous file with comments | « ui/gl/gl_context.h ('k') | ui/gl/gl_context_android.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 "ui/gl/gl_context.h" 5 #include "ui/gl/gl_context.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/cancelable_callback.h" 10 #include "base/cancelable_callback.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 GLContextReal::~GLContextReal() { 223 GLContextReal::~GLContextReal() {
224 if (GetRealCurrent() == this) 224 if (GetRealCurrent() == this)
225 current_real_context_.Pointer()->Set(nullptr); 225 current_real_context_.Pointer()->Set(nullptr);
226 } 226 }
227 227
228 void GLContextReal::SetCurrent(GLSurface* surface) { 228 void GLContextReal::SetCurrent(GLSurface* surface) {
229 GLContext::SetCurrent(surface); 229 GLContext::SetCurrent(surface);
230 current_real_context_.Pointer()->Set(surface ? this : nullptr); 230 current_real_context_.Pointer()->Set(surface ? this : nullptr);
231 } 231 }
232 232
233 scoped_refptr<GLContext> InitializeGLContext(scoped_refptr<GLContext> context,
234 GLSurface* compatible_surface,
235 GpuPreference gpu_preference) {
236 if (!context->Initialize(compatible_surface, gpu_preference))
237 return nullptr;
238 return context;
239 }
240
233 } // namespace gl 241 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/gl_context.h ('k') | ui/gl/gl_context_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698