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

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

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.gyp ('k') | ui/gl/gl_context.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 #ifndef UI_GL_GL_CONTEXT_H_ 5 #ifndef UI_GL_GL_CONTEXT_H_
6 #define UI_GL_GL_CONTEXT_H_ 6 #define UI_GL_GL_CONTEXT_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 protected: 191 protected:
192 ~GLContextReal() override; 192 ~GLContextReal() override;
193 193
194 void SetCurrent(GLSurface* surface) override; 194 void SetCurrent(GLSurface* surface) override;
195 195
196 private: 196 private:
197 std::unique_ptr<GPUTiming> gpu_timing_; 197 std::unique_ptr<GPUTiming> gpu_timing_;
198 DISALLOW_COPY_AND_ASSIGN(GLContextReal); 198 DISALLOW_COPY_AND_ASSIGN(GLContextReal);
199 }; 199 };
200 200
201 // Wraps GLContext in scoped_refptr and tries to initializes it. Returns a
202 // scoped_refptr containing the initialized GLContext or nullptr if
203 // initialization fails.
204 GL_EXPORT scoped_refptr<GLContext> InitializeGLContext(
205 scoped_refptr<GLContext> context,
206 GLSurface* compatible_surface,
207 GpuPreference gpu_preference);
208
201 } // namespace gl 209 } // namespace gl
202 210
203 #endif // UI_GL_GL_CONTEXT_H_ 211 #endif // UI_GL_GL_CONTEXT_H_
OLDNEW
« no previous file with comments | « ui/gl/gl.gyp ('k') | ui/gl/gl_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698