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

Side by Side Diff: bench/benchmain.cpp

Issue 150513005: impl getROPixels for gpu SkImage (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/image/SkImage_Gpu.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 2011 Google Inc. 2 * Copyright 2011 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 "BenchTimer.h" 8 #include "BenchTimer.h"
9 #include "ResultsWriter.h" 9 #include "ResultsWriter.h"
10 #include "SkBenchLogger.h" 10 #include "SkBenchLogger.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 if (NULL == data.get()) { 147 if (NULL == data.get()) {
148 return; 148 return;
149 } 149 }
150 150
151 SkString filename; 151 SkString filename;
152 make_filename(name, &filename); 152 make_filename(name, &filename);
153 filename.appendf("_%s.png", config); 153 filename.appendf("_%s.png", config);
154 SkString path = SkOSPath::SkPathJoin(dir, filename.c_str()); 154 SkString path = SkOSPath::SkPathJoin(dir, filename.c_str());
155 ::remove(path.c_str()); 155 ::remove(path.c_str());
156 156
157 SkFILEWStream stream(filename.c_str()); 157 SkFILEWStream stream(path.c_str());
158 stream.write(data->data(), data->size()); 158 stream.write(data->data(), data->size());
159 } 159 }
160 160
161 static void performClip(SkCanvas* canvas, int w, int h) { 161 static void performClip(SkCanvas* canvas, int w, int h) {
162 SkRect r; 162 SkRect r;
163 163
164 r.set(SkIntToScalar(10), SkIntToScalar(10), 164 r.set(SkIntToScalar(10), SkIntToScalar(10),
165 SkIntToScalar(w*2/3), SkIntToScalar(h*2/3)); 165 SkIntToScalar(w*2/3), SkIntToScalar(h*2/3));
166 canvas->clipRect(r, SkRegion::kIntersect_Op); 166 canvas->clipRect(r, SkRegion::kIntersect_Op);
167 167
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 gContextFactory.destroyContexts(); 717 gContextFactory.destroyContexts();
718 #endif 718 #endif
719 return 0; 719 return 0;
720 } 720 }
721 721
722 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) 722 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL)
723 int main(int argc, char * const argv[]) { 723 int main(int argc, char * const argv[]) {
724 return tool_main(argc, (char**) argv); 724 return tool_main(argc, (char**) argv);
725 } 725 }
726 #endif 726 #endif
OLDNEW
« no previous file with comments | « no previous file | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698