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

Side by Side Diff: tools/VisualBench.cpp

Issue 1184143011: nibless mac, visual bench working on mac (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix HelloWorld compile on windows Created 5 years, 6 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 | « src/views/mac/skia_mac.mm ('k') | no next file » | 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 8
9 #include "VisualBench.h" 9 #include "VisualBench.h"
10 10
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 } 116 }
117 117
118 void VisualBench::setupRenderTarget() { 118 void VisualBench::setupRenderTarget() {
119 if (fContext) { 119 if (fContext) {
120 fRenderTarget.reset(this->renderTarget(fAttachmentInfo, fInterface, fCon text)); 120 fRenderTarget.reset(this->renderTarget(fAttachmentInfo, fInterface, fCon text));
121 } 121 }
122 } 122 }
123 123
124 inline void VisualBench::renderFrame(SkCanvas* canvas) { 124 inline void VisualBench::renderFrame(SkCanvas* canvas) {
125 canvas->drawPicture(fPicture); 125 canvas->drawPicture(fPicture);
126 fContext->flush(); 126 canvas->flush();
127 INHERITED::present(); 127 INHERITED::present();
128 } 128 }
129 129
130 void VisualBench::printStats() { 130 void VisualBench::printStats() {
131 const SkTArray<double>& measurements = fRecords[fCurrentPictureIdx].fMeasure ments; 131 const SkTArray<double>& measurements = fRecords[fCurrentPictureIdx].fMeasure ments;
132 SkString shortName = SkOSPath::Basename(fRecords[fCurrentPictureIdx].fFilena me.c_str()); 132 SkString shortName = SkOSPath::Basename(fRecords[fCurrentPictureIdx].fFilena me.c_str());
133 if (FLAGS_verbose) { 133 if (FLAGS_verbose) {
134 for (int i = 0; i < measurements.count(); i++) { 134 for (int i = 0; i < measurements.count(); i++) {
135 SkDebugf("%s ", HUMANIZE(measurements[i])); 135 SkDebugf("%s ", HUMANIZE(measurements[i]));
136 } 136 }
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 240
241 void application_term() { 241 void application_term() {
242 SkEvent::Term(); 242 SkEvent::Term();
243 SkGraphics::Term(); 243 SkGraphics::Term();
244 } 244 }
245 245
246 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) { 246 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) {
247 return new VisualBench(hwnd, argc, argv); 247 return new VisualBench(hwnd, argc, argv);
248 } 248 }
249 249
OLDNEW
« no previous file with comments | « src/views/mac/skia_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698