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

Side by Side Diff: bench/GLBench.cpp

Issue 2004433002: Retract GrRenderTarget from GrTestTarget (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix bench build Created 4 years, 7 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 | gm/imagefromyuvtextures.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
11 #include "GrGpu.h"
11 #include "GrTest.h" 12 #include "GrTest.h"
13 #include "gl/GrGLContext.h"
12 #include <stdio.h> 14 #include <stdio.h>
13 15
14 const GrGLContext* GLBench::getGLContext(SkCanvas* canvas) { 16 const GrGLContext* GLBench::getGLContext(SkCanvas* canvas) {
15 // This bench exclusively tests GL calls directly 17 // This bench exclusively tests GL calls directly
16 if (nullptr == canvas->getGrContext()) { 18 if (nullptr == canvas->getGrContext()) {
17 return nullptr; 19 return nullptr;
18 } 20 }
19 GrContext* context = canvas->getGrContext(); 21 GrContext* context = canvas->getGrContext();
20 GrGpu* gpu = context->getGpu(); 22 GrGpu* gpu = context->getGpu();
21 if (!gpu) { 23 if (!gpu) {
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 bm.setPixels(readback.get()); 166 bm.setPixels(readback.get());
165 167
166 if (!SkImageEncoder::EncodeFile(filename, bm, SkImageEncoder::kPNG_Type, 100 )) { 168 if (!SkImageEncoder::EncodeFile(filename, bm, SkImageEncoder::kPNG_Type, 100 )) {
167 SkDebugf("------ failed to encode %s\n", filename); 169 SkDebugf("------ failed to encode %s\n", filename);
168 remove(filename); // remove any partial file 170 remove(filename); // remove any partial file
169 return; 171 return;
170 } 172 }
171 } 173 }
172 174
173 #endif 175 #endif
OLDNEW
« no previous file with comments | « no previous file | gm/imagefromyuvtextures.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698