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

Side by Side Diff: src/gpu/gl/GrGLProgramDataManager.h

Issue 1195573002: Make GrGLProgramDataManager not refcounted (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: address review comment! Created 5 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 | « no previous file | 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 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 GrGLProgramDataManager_DEFINED 8 #ifndef GrGLProgramDataManager_DEFINED
9 #define GrGLProgramDataManager_DEFINED 9 #define GrGLProgramDataManager_DEFINED
10 10
11 #include "gl/GrGLShaderVar.h" 11 #include "gl/GrGLShaderVar.h"
12 #include "gl/GrGLSL.h" 12 #include "gl/GrGLSL.h"
13 #include "GrAllocator.h" 13 #include "GrAllocator.h"
14 14
15 #include "SkTArray.h" 15 #include "SkTArray.h"
16 16
17 class GrGLGpu; 17 class GrGLGpu;
18 class SkMatrix; 18 class SkMatrix;
19 class GrGLProgram; 19 class GrGLProgram;
20 class GrGLProgramBuilder; 20 class GrGLProgramBuilder;
21 21
22 /** Manages the resources used by a shader program. 22 /** Manages the resources used by a shader program.
23 * The resources are objects the program uses to communicate with the 23 * The resources are objects the program uses to communicate with the
24 * application code. 24 * application code.
25 */ 25 */
26 class GrGLProgramDataManager : public SkRefCnt { 26 class GrGLProgramDataManager : SkNoncopyable {
27 public: 27 public:
28 // Opaque handle to a uniform 28 // Opaque handle to a uniform
29 class ShaderResourceHandle { 29 class ShaderResourceHandle {
30 public: 30 public:
31 bool isValid() const { return -1 != fValue; } 31 bool isValid() const { return -1 != fValue; }
32 ShaderResourceHandle() 32 ShaderResourceHandle()
33 : fValue(-1) { 33 : fValue(-1) {
34 } 34 }
35 protected: 35 protected:
36 ShaderResourceHandle(int value) 36 ShaderResourceHandle(int value)
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 GrSLType fType; 104 GrSLType fType;
105 int fArrayCount; 105 int fArrayCount;
106 ); 106 );
107 }; 107 };
108 108
109 SkDEBUGCODE(void printUnused(const Uniform&) const;) 109 SkDEBUGCODE(void printUnused(const Uniform&) const;)
110 110
111 SkTArray<Uniform, true> fUniforms; 111 SkTArray<Uniform, true> fUniforms;
112 GrGLGpu* fGpu; 112 GrGLGpu* fGpu;
113 113
114 typedef SkRefCnt INHERITED; 114 typedef SkNoncopyable INHERITED;
115 }; 115 };
116
116 #endif 117 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698