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

Side by Side Diff: include/gpu/gl/GrGLExtensions.h

Issue 1674823002: Replace GrGLInterface's function pointers with std::functions (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase and address comment Created 4 years, 10 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 | « no previous file | include/gpu/gl/GrGLFunctions.h » ('j') | include/gpu/gl/GrGLFunctions.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrGLExtensions_DEFINED 8 #ifndef GrGLExtensions_DEFINED
9 #define GrGLExtensions_DEFINED 9 #define GrGLExtensions_DEFINED
10 10
(...skipping 21 matching lines...) Expand all
32 fStrings.swap(that->fStrings); 32 fStrings.swap(that->fStrings);
33 SkTSwap(fInitialized, that->fInitialized); 33 SkTSwap(fInitialized, that->fInitialized);
34 } 34 }
35 35
36 /** 36 /**
37 * We sometimes need to use this class without having yet created a GrGLInte rface. This version 37 * We sometimes need to use this class without having yet created a GrGLInte rface. This version
38 * of init expects that getString is always non-NULL while getIntegerv and g etStringi are non- 38 * of init expects that getString is always non-NULL while getIntegerv and g etStringi are non-
39 * NULL if on desktop GL with version 3.0 or higher. Otherwise it will fail. 39 * NULL if on desktop GL with version 3.0 or higher. Otherwise it will fail.
40 */ 40 */
41 bool init(GrGLStandard standard, 41 bool init(GrGLStandard standard,
42 GrGLGetStringProc getString, 42 GrGLFunction<GrGLGetStringProc> getString,
43 GrGLGetStringiProc getStringi, 43 GrGLFunction<GrGLGetStringiProc> getStringi,
44 GrGLGetIntegervProc getIntegerv, 44 GrGLFunction<GrGLGetIntegervProc> getIntegerv,
45 GrEGLQueryStringProc queryString = nullptr, 45 GrGLFunction<GrEGLQueryStringProc> queryString = nullptr,
46 GrEGLDisplay eglDisplay = nullptr); 46 GrEGLDisplay eglDisplay = nullptr);
47 47
48 bool isInitialized() const { return fInitialized; } 48 bool isInitialized() const { return fInitialized; }
49 49
50 /** 50 /**
51 * Queries whether an extension is present. This will fail if init() has not been called. 51 * Queries whether an extension is present. This will fail if init() has not been called.
52 */ 52 */
53 bool has(const char[]) const; 53 bool has(const char[]) const;
54 54
55 /** 55 /**
56 * Removes an extension if present. Returns true if the extension was presen t before the call. 56 * Removes an extension if present. Returns true if the extension was presen t before the call.
57 */ 57 */
58 bool remove(const char[]); 58 bool remove(const char[]);
59 59
60 /** 60 /**
61 * Adds an extension to list 61 * Adds an extension to list
62 */ 62 */
63 void add(const char[]); 63 void add(const char[]);
64 64
65 void reset() { fStrings->reset(); } 65 void reset() { fStrings->reset(); }
66 66
67 void print(const char* sep = "\n") const; 67 void print(const char* sep = "\n") const;
68 68
69 private: 69 private:
70 bool fInitialized; 70 bool fInitialized;
71 SkAutoTDelete<SkTArray<SkString> > fStrings; 71 SkAutoTDelete<SkTArray<SkString> > fStrings;
72 }; 72 };
73 73
74 #endif 74 #endif
OLDNEW
« no previous file with comments | « no previous file | include/gpu/gl/GrGLFunctions.h » ('j') | include/gpu/gl/GrGLFunctions.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698