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

Side by Side Diff: samplecode/OverView.cpp

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 years, 3 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 | « samplecode/GMSampleView.cpp ('k') | samplecode/SampleApp.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 "OverView.h" 8 #include "OverView.h"
9 #include "SampleCode.h" 9 #include "SampleCode.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 if (loc->fY > this->height() - fNameMetrics.fBottom) { 112 if (loc->fY > this->height() - fNameMetrics.fBottom) {
113 loc->fY = -fNameMetrics.fTop; 113 loc->fY = -fNameMetrics.fTop;
114 loc->fX += fNameW; 114 loc->fX += fNameW;
115 } 115 }
116 } 116 }
117 117
118 typedef SkView INHERITED; 118 typedef SkView INHERITED;
119 }; 119 };
120 120
121 SkView* create_overview(int count, const SkViewFactory* factories[]) { 121 SkView* create_overview(int count, const SkViewFactory* factories[]) {
122 return SkNEW_ARGS(OverView, (count, factories)); 122 return new OverView(count, factories);
123 } 123 }
124 124
125 bool is_overview(SkView* view) { 125 bool is_overview(SkView* view) {
126 SkEvent isOverview(gIsOverview); 126 SkEvent isOverview(gIsOverview);
127 return view->doQuery(&isOverview); 127 return view->doQuery(&isOverview);
128 } 128 }
129 129
130 OverView::OverView(int count, const SkViewFactory* factories[]) { 130 OverView::OverView(int count, const SkViewFactory* factories[]) {
131 fCount = count; 131 fCount = count;
132 fFactories = factories; 132 fFactories = factories;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 SkPoint loc = this->start(); 164 SkPoint loc = this->start();
165 for (int i = 0; i < fCount; ++i) { 165 for (int i = 0; i < fCount; ++i) {
166 if (draw_this_name(fNames[i], fMatchStr)) { 166 if (draw_this_name(fNames[i], fMatchStr)) {
167 canvas->drawRect(this->bounds(loc), paint); 167 canvas->drawRect(this->bounds(loc), paint);
168 canvas->drawText(fNames[i].c_str(), fNames[i].size(), loc.x(), loc.y (), fNamePaint); 168 canvas->drawText(fNames[i].c_str(), fNames[i].size(), loc.x(), loc.y (), fNamePaint);
169 this->next(&loc); 169 this->next(&loc);
170 } 170 }
171 } 171 }
172 } 172 }
173 173
OLDNEW
« no previous file with comments | « samplecode/GMSampleView.cpp ('k') | samplecode/SampleApp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698