OLD | NEW |
1 | |
2 /* | 1 /* |
3 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
4 * | 3 * |
5 * 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 |
6 * found in the LICENSE file. | 5 * found in the LICENSE file. |
7 */ | 6 */ |
8 #include "gl/SkGLContext.h" | 7 #include "gl/SkGLContext.h" |
9 #include "GrGLUtil.h" | 8 #include "GrGLUtil.h" |
10 #include "SkGpuFenceSync.h" | 9 #include "SkGpuFenceSync.h" |
11 | 10 |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 } | 169 } |
171 | 170 |
172 GrGLuint id; | 171 GrGLuint id; |
173 GR_GL_CALL(fGL, GenTextures(1, &id)); | 172 GR_GL_CALL(fGL, GenTextures(1, &id)); |
174 GR_GL_CALL(fGL, BindTexture(GR_GL_TEXTURE_RECTANGLE, id)); | 173 GR_GL_CALL(fGL, BindTexture(GR_GL_TEXTURE_RECTANGLE, id)); |
175 GR_GL_CALL(fGL, TexParameteri(GR_GL_TEXTURE_RECTANGLE, GR_GL_TEXTURE_MAG_FIL
TER, | 174 GR_GL_CALL(fGL, TexParameteri(GR_GL_TEXTURE_RECTANGLE, GR_GL_TEXTURE_MAG_FIL
TER, |
176 GR_GL_NEAREST)); | 175 GR_GL_NEAREST)); |
177 GR_GL_CALL(fGL, TexParameteri(GR_GL_TEXTURE_RECTANGLE, GR_GL_TEXTURE_MIN_FIL
TER, | 176 GR_GL_CALL(fGL, TexParameteri(GR_GL_TEXTURE_RECTANGLE, GR_GL_TEXTURE_MIN_FIL
TER, |
178 GR_GL_NEAREST)); | 177 GR_GL_NEAREST)); |
179 GR_GL_CALL(fGL, TexParameteri(GR_GL_TEXTURE_RECTANGLE, GR_GL_TEXTURE_WRAP_S, | 178 GR_GL_CALL(fGL, TexParameteri(GR_GL_TEXTURE_RECTANGLE, GR_GL_TEXTURE_WRAP_S, |
180 GR_GL_CLAMP_TO_EDGE)); | 179 GR_GL_CLAMP_TO_EDGE)); |
181 GR_GL_CALL(fGL, TexParameteri(GR_GL_TEXTURE_RECTANGLE, GR_GL_TEXTURE_WRAP_T, | 180 GR_GL_CALL(fGL, TexParameteri(GR_GL_TEXTURE_RECTANGLE, GR_GL_TEXTURE_WRAP_T, |
182 GR_GL_CLAMP_TO_EDGE)); | 181 GR_GL_CLAMP_TO_EDGE)); |
183 GR_GL_CALL(fGL, TexImage2D(GR_GL_TEXTURE_RECTANGLE, 0, internalFormat, width
, height, 0, | 182 GR_GL_CALL(fGL, TexImage2D(GR_GL_TEXTURE_RECTANGLE, 0, internalFormat, width
, height, 0, |
184 externalFormat, externalType, data)); | 183 externalFormat, externalType, data)); |
185 return id; | 184 return id; |
186 } | 185 } |
OLD | NEW |