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

Side by Side Diff: samplecode/SampleApp.cpp

Issue 777643003: use ClipOp instead of SkRegion for clipping (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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 | « include/core/SkCanvas.h ('k') | samplecode/SampleClip.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 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 #if SK_SUPPORT_GPU 1301 #if SK_SUPPORT_GPU
1302 if (kNullGPU_DeviceType != fDeviceType) 1302 if (kNullGPU_DeviceType != fDeviceType)
1303 #endif 1303 #endif
1304 { 1304 {
1305 canvas = this->INHERITED::beforeChildren(canvas); 1305 canvas = this->INHERITED::beforeChildren(canvas);
1306 } 1306 }
1307 } 1307 }
1308 1308
1309 if (fUseClip) { 1309 if (fUseClip) {
1310 canvas->drawColor(0xFFFF88FF); 1310 canvas->drawColor(0xFFFF88FF);
1311 canvas->clipPath(fClipPath, SkRegion::kIntersect_Op, true); 1311 canvas->clipPath(fClipPath, kIntersect_SkClipOp, true);
1312 } 1312 }
1313 1313
1314 return canvas; 1314 return canvas;
1315 } 1315 }
1316 #include "SkMultiPictureDraw.h" 1316 #include "SkMultiPictureDraw.h"
1317 void SampleWindow::afterChildren(SkCanvas* orig) { 1317 void SampleWindow::afterChildren(SkCanvas* orig) {
1318 if (fSaveToPdf) { 1318 if (fSaveToPdf) {
1319 fSaveToPdf = false; 1319 fSaveToPdf = false;
1320 fPDFDocument->endPage(); 1320 fPDFDocument->endPage();
1321 fPDFDocument.reset(NULL); 1321 fPDFDocument.reset(NULL);
(...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after
2433 setenv("ANDROID_ROOT", "/android/device/data", 0); 2433 setenv("ANDROID_ROOT", "/android/device/data", 0);
2434 #endif 2434 #endif
2435 SkGraphics::Init(); 2435 SkGraphics::Init();
2436 SkEvent::Init(); 2436 SkEvent::Init();
2437 } 2437 }
2438 2438
2439 void application_term() { 2439 void application_term() {
2440 SkEvent::Term(); 2440 SkEvent::Term();
2441 SkGraphics::Term(); 2441 SkGraphics::Term();
2442 } 2442 }
OLDNEW
« no previous file with comments | « include/core/SkCanvas.h ('k') | samplecode/SampleClip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698