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

Side by Side Diff: bench/GLBench.cpp

Issue 1379923005: Remove const from `const int loops`. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: n too Created 5 years, 2 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 | « bench/GLBench.h ('k') | bench/GLInstancedArraysBench.cpp » ('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 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 "GLBench.h" 8 #include "GLBench.h"
9 9
10 #if SK_SUPPORT_GPU 10 #if SK_SUPPORT_GPU
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 void GLBench::onPostDraw(SkCanvas* canvas) { 44 void GLBench::onPostDraw(SkCanvas* canvas) {
45 // This bench exclusively tests GL calls directly 45 // This bench exclusively tests GL calls directly
46 const GrGLContext* ctx = this->getGLContext(canvas); 46 const GrGLContext* ctx = this->getGLContext(canvas);
47 if (!ctx) { 47 if (!ctx) {
48 return; 48 return;
49 } 49 }
50 this->teardown(ctx->interface()); 50 this->teardown(ctx->interface());
51 } 51 }
52 52
53 void GLBench::onDraw(const int loops, SkCanvas* canvas) { 53 void GLBench::onDraw(int loops, SkCanvas* canvas) {
54 const GrGLContext* ctx = this->getGLContext(canvas); 54 const GrGLContext* ctx = this->getGLContext(canvas);
55 if (!ctx) { 55 if (!ctx) {
56 return; 56 return;
57 } 57 }
58 this->glDraw(loops, ctx); 58 this->glDraw(loops, ctx);
59 } 59 }
60 60
61 GrGLuint GLBench::CompileShader(const GrGLInterface* gl, const char* shaderSrc, GrGLenum type) { 61 GrGLuint GLBench::CompileShader(const GrGLInterface* gl, const char* shaderSrc, GrGLenum type) {
62 GrGLuint shader; 62 GrGLuint shader;
63 // Create the shader object 63 // Create the shader object
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 bm.setPixels(readback.get()); 163 bm.setPixels(readback.get());
164 164
165 if (!SkImageEncoder::EncodeFile(filename, bm, SkImageEncoder::kPNG_Type, 100 )) { 165 if (!SkImageEncoder::EncodeFile(filename, bm, SkImageEncoder::kPNG_Type, 100 )) {
166 SkDebugf("------ failed to encode %s\n", filename); 166 SkDebugf("------ failed to encode %s\n", filename);
167 remove(filename); // remove any partial file 167 remove(filename); // remove any partial file
168 return; 168 return;
169 } 169 }
170 } 170 }
171 171
172 #endif 172 #endif
OLDNEW
« no previous file with comments | « bench/GLBench.h ('k') | bench/GLInstancedArraysBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698