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

Side by Side Diff: gm/rectangletexture.cpp

Issue 1812323002: Make the debug interface a GrGLTestInterface subclass. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: remove unused member Created 4 years, 9 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 | gyp/gpu.gypi » ('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 /* 2 /*
3 * Copyright 2016 Google Inc. 3 * Copyright 2016 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 // This test only works with the GPU backend. 9 // This test only works with the GPU backend.
10 10
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 format = GR_GL_BGRA; 80 format = GR_GL_BGRA;
81 } else { 81 } else {
82 SkASSERT(kSkia8888_GrPixelConfig == kRGBA_8888_GrPixelConfig); 82 SkASSERT(kSkia8888_GrPixelConfig == kRGBA_8888_GrPixelConfig);
83 format = GR_GL_RGBA; 83 format = GR_GL_RGBA;
84 } 84 }
85 85
86 const GrGLInterface* gl = glCtx->interface(); 86 const GrGLInterface* gl = glCtx->interface();
87 // Useful for debugging whether errors result from use of RECTANGLE 87 // Useful for debugging whether errors result from use of RECTANGLE
88 // #define TARGET GR_GL_TEXTURE_2D 88 // #define TARGET GR_GL_TEXTURE_2D
89 #define TARGET GR_GL_TEXTURE_RECTANGLE 89 #define TARGET GR_GL_TEXTURE_RECTANGLE
90 GrGLuint id; 90 GrGLuint id = 0;
91 GR_GL_CALL(gl, GenTextures(1, &id)); 91 GR_GL_CALL(gl, GenTextures(1, &id));
92 GR_GL_CALL(gl, BindTexture(TARGET, id)); 92 GR_GL_CALL(gl, BindTexture(TARGET, id));
93 GR_GL_CALL(gl, TexParameteri(TARGET, GR_GL_TEXTURE_MAG_FILTER, 93 GR_GL_CALL(gl, TexParameteri(TARGET, GR_GL_TEXTURE_MAG_FILTER,
94 GR_GL_NEAREST)); 94 GR_GL_NEAREST));
95 GR_GL_CALL(gl, TexParameteri(TARGET, GR_GL_TEXTURE_MIN_FILTER, 95 GR_GL_CALL(gl, TexParameteri(TARGET, GR_GL_TEXTURE_MIN_FILTER,
96 GR_GL_NEAREST)); 96 GR_GL_NEAREST));
97 GR_GL_CALL(gl, TexParameteri(TARGET, GR_GL_TEXTURE_WRAP_S, 97 GR_GL_CALL(gl, TexParameteri(TARGET, GR_GL_TEXTURE_WRAP_S,
98 GR_GL_CLAMP_TO_EDGE)); 98 GR_GL_CLAMP_TO_EDGE));
99 GR_GL_CALL(gl, TexParameteri(TARGET, GR_GL_TEXTURE_WRAP_T, 99 GR_GL_CALL(gl, TexParameteri(TARGET, GR_GL_TEXTURE_WRAP_T,
100 GR_GL_CLAMP_TO_EDGE)); 100 GR_GL_CLAMP_TO_EDGE));
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 } 182 }
183 183
184 private: 184 private:
185 typedef GM INHERITED; 185 typedef GM INHERITED;
186 }; 186 };
187 187
188 DEF_GM(return new RectangleTexture;) 188 DEF_GM(return new RectangleTexture;)
189 } 189 }
190 190
191 #endif 191 #endif
OLDNEW
« no previous file with comments | « no previous file | gyp/gpu.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698