OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 #include "Benchmark.h" | 8 #include "Benchmark.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkImageEncoder.h" | 10 #include "SkImageEncoder.h" |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 } | 246 } |
247 | 247 |
248 void GLVertexAttributesBench::teardown(const GrGLInterface* gl) { | 248 void GLVertexAttributesBench::teardown(const GrGLInterface* gl) { |
249 // teardown | 249 // teardown |
250 GR_GL_CALL(gl, BindBuffer(GR_GL_ARRAY_BUFFER, 0)); | 250 GR_GL_CALL(gl, BindBuffer(GR_GL_ARRAY_BUFFER, 0)); |
251 GR_GL_CALL(gl, BindTexture(GR_GL_TEXTURE_2D, 0)); | 251 GR_GL_CALL(gl, BindTexture(GR_GL_TEXTURE_2D, 0)); |
252 GR_GL_CALL(gl, BindFramebuffer(GR_GL_FRAMEBUFFER, 0)); | 252 GR_GL_CALL(gl, BindFramebuffer(GR_GL_FRAMEBUFFER, 0)); |
253 GR_GL_CALL(gl, DeleteTextures(1, &fTexture)); | 253 GR_GL_CALL(gl, DeleteTextures(1, &fTexture)); |
254 GR_GL_CALL(gl, DeleteProgram(fProgram)); | 254 GR_GL_CALL(gl, DeleteProgram(fProgram)); |
255 GR_GL_CALL(gl, DeleteBuffers(fBuffers.count(), fBuffers.begin())); | 255 GR_GL_CALL(gl, DeleteBuffers(fBuffers.count(), fBuffers.begin())); |
| 256 fBuffers.reset(); |
256 } | 257 } |
257 | 258 |
258 /////////////////////////////////////////////////////////////////////////////// | 259 /////////////////////////////////////////////////////////////////////////////// |
259 | 260 |
260 DEF_BENCH( return new GLVertexAttributesBench(0) ) | 261 DEF_BENCH( return new GLVertexAttributesBench(0) ) |
261 DEF_BENCH( return new GLVertexAttributesBench(1) ) | 262 DEF_BENCH( return new GLVertexAttributesBench(1) ) |
262 DEF_BENCH( return new GLVertexAttributesBench(2) ) | 263 DEF_BENCH( return new GLVertexAttributesBench(2) ) |
263 DEF_BENCH( return new GLVertexAttributesBench(3) ) | 264 DEF_BENCH( return new GLVertexAttributesBench(3) ) |
264 DEF_BENCH( return new GLVertexAttributesBench(4) ) | 265 DEF_BENCH( return new GLVertexAttributesBench(4) ) |
265 DEF_BENCH( return new GLVertexAttributesBench(5) ) | 266 DEF_BENCH( return new GLVertexAttributesBench(5) ) |
266 DEF_BENCH( return new GLVertexAttributesBench(6) ) | 267 DEF_BENCH( return new GLVertexAttributesBench(6) ) |
267 DEF_BENCH( return new GLVertexAttributesBench(7) ) | 268 DEF_BENCH( return new GLVertexAttributesBench(7) ) |
268 #endif | 269 #endif |
OLD | NEW |