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

Side by Side Diff: samplecode/SampleApp.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/OverView.cpp ('k') | samplecode/SampleArc.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 "SampleApp.h" 8 #include "SampleApp.h"
9 9
10 #include "OverView.h" 10 #include "OverView.h"
(...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after
1268 canvas->drawColor(0xFFFF88FF); 1268 canvas->drawColor(0xFFFF88FF);
1269 canvas->clipPath(fClipPath, SkRegion::kIntersect_Op, true); 1269 canvas->clipPath(fClipPath, SkRegion::kIntersect_Op, true);
1270 } 1270 }
1271 1271
1272 // Install a flags filter proxy canvas if needed 1272 // Install a flags filter proxy canvas if needed
1273 if (fLCDState != SkOSMenu::kMixedState || 1273 if (fLCDState != SkOSMenu::kMixedState ||
1274 fAAState != SkOSMenu::kMixedState || 1274 fAAState != SkOSMenu::kMixedState ||
1275 fSubpixelState != SkOSMenu::kMixedState || 1275 fSubpixelState != SkOSMenu::kMixedState ||
1276 fHintingState > 0 || 1276 fHintingState > 0 ||
1277 fFilterQualityIndex > 0) { 1277 fFilterQualityIndex > 0) {
1278 1278 canvas = new FlagsFilterCanvas(canvas, fLCDState, fAAState, fSubpixelSta te, fHintingState,
1279 canvas = SkNEW_ARGS(FlagsFilterCanvas, (canvas, fLCDState, fAAState, fSu bpixelState, 1279 fFilterQualityIndex);
1280 fHintingState, fFilterQualityInd ex));
1281 fFlagsFilterCanvas.reset(canvas); 1280 fFlagsFilterCanvas.reset(canvas);
1282 } 1281 }
1283 1282
1284 return canvas; 1283 return canvas;
1285 } 1284 }
1286 #include "SkMultiPictureDraw.h" 1285 #include "SkMultiPictureDraw.h"
1287 void SampleWindow::afterChildren(SkCanvas* orig) { 1286 void SampleWindow::afterChildren(SkCanvas* orig) {
1288 fFlagsFilterCanvas.reset(NULL); 1287 fFlagsFilterCanvas.reset(NULL);
1289 1288
1290 if (fSaveToPdf) { 1289 if (fSaveToPdf) {
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
1664 this->inval(NULL); 1663 this->inval(NULL);
1665 } 1664 }
1666 break; 1665 break;
1667 case ' ': 1666 case ' ':
1668 gAnimTimer.togglePauseResume(); 1667 gAnimTimer.togglePauseResume();
1669 if (this->sendAnimatePulse()) { 1668 if (this->sendAnimatePulse()) {
1670 this->inval(NULL); 1669 this->inval(NULL);
1671 } 1670 }
1672 break; 1671 break;
1673 case 'B': 1672 case 'B':
1674 post_event_to_sink(SkNEW_ARGS(SkEvent, ("PictFileView::toggleBBox")) , curr_view(this)); 1673 post_event_to_sink(new SkEvent("PictFileView::toggleBBox"), curr_vie w(this));
1675 // Cannot call updateTitle() synchronously, because the toggleBBox e vent is still in 1674 // Cannot call updateTitle() synchronously, because the toggleBBox e vent is still in
1676 // the queue. 1675 // the queue.
1677 post_event_to_sink(SkNEW_ARGS(SkEvent, (gUpdateWindowTitleEvtName)), this); 1676 post_event_to_sink(new SkEvent(gUpdateWindowTitleEvtName), this);
1678 this->inval(NULL); 1677 this->inval(NULL);
1679 break; 1678 break;
1680 case 'D': 1679 case 'D':
1681 toggleDistanceFieldFonts(); 1680 toggleDistanceFieldFonts();
1682 break; 1681 break;
1683 case 'f': 1682 case 'f':
1684 // only 1683 // only
1685 toggleFPS(); 1684 toggleFPS();
1686 break; 1685 break;
1687 case 'F': 1686 case 'F':
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
2368 setenv("ANDROID_ROOT", "/android/device/data", 0); 2367 setenv("ANDROID_ROOT", "/android/device/data", 0);
2369 #endif 2368 #endif
2370 SkGraphics::Init(); 2369 SkGraphics::Init();
2371 SkEvent::Init(); 2370 SkEvent::Init();
2372 } 2371 }
2373 2372
2374 void application_term() { 2373 void application_term() {
2375 SkEvent::Term(); 2374 SkEvent::Term();
2376 SkGraphics::Term(); 2375 SkGraphics::Term();
2377 } 2376 }
OLDNEW
« no previous file with comments | « samplecode/OverView.cpp ('k') | samplecode/SampleArc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698