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

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

Issue 1330503006: Add skstd::unique_ptr and use it. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Formatting. Created 5 years, 3 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/private/SkFunction.h » ('j') | no next file with comments »
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 10 matching lines...) Expand all
21 */ 21 */
22 class SK_API GrGLExtensions { 22 class SK_API GrGLExtensions {
23 public: 23 public:
24 GrGLExtensions() : fInitialized(false), fStrings(new SkTArray<SkString>) {} 24 GrGLExtensions() : fInitialized(false), fStrings(new SkTArray<SkString>) {}
25 25
26 GrGLExtensions(const GrGLExtensions&); 26 GrGLExtensions(const GrGLExtensions&);
27 27
28 GrGLExtensions& operator=(const GrGLExtensions&); 28 GrGLExtensions& operator=(const GrGLExtensions&);
29 29
30 void swap(GrGLExtensions* that) { 30 void swap(GrGLExtensions* that) {
31 fStrings.swap(&that->fStrings); 31 fStrings.swap(that->fStrings);
32 SkTSwap(fInitialized, that->fInitialized); 32 SkTSwap(fInitialized, that->fInitialized);
33 } 33 }
34 34
35 /** 35 /**
36 * We sometimes need to use this class without having yet created a GrGLInte rface. This version 36 * We sometimes need to use this class without having yet created a GrGLInte rface. This version
37 * of init expects that getString is always non-NULL while getIntegerv and g etStringi are non- 37 * of init expects that getString is always non-NULL while getIntegerv and g etStringi are non-
38 * NULL if on desktop GL with version 3.0 or higher. Otherwise it will fail. 38 * NULL if on desktop GL with version 3.0 or higher. Otherwise it will fail.
39 */ 39 */
40 bool init(GrGLStandard standard, 40 bool init(GrGLStandard standard,
41 GrGLGetStringProc getString, 41 GrGLGetStringProc getString,
(...skipping 20 matching lines...) Expand all
62 void reset() { fStrings->reset(); } 62 void reset() { fStrings->reset(); }
63 63
64 void print(const char* sep = "\n") const; 64 void print(const char* sep = "\n") const;
65 65
66 private: 66 private:
67 bool fInitialized; 67 bool fInitialized;
68 SkAutoTDelete<SkTArray<SkString> > fStrings; 68 SkAutoTDelete<SkTArray<SkString> > fStrings;
69 }; 69 };
70 70
71 #endif 71 #endif
OLDNEW
« no previous file with comments | « no previous file | include/private/SkFunction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698