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

Side by Side Diff: samplecode/SampleComplexClip.cpp

Issue 147683003: fix more 64bit warnings (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 11 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 | « samplecode/SampleApp.cpp ('k') | samplecode/SampleEncode.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "SampleCode.h" 8 #include "SampleCode.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkPath.h" 10 #include "SkPath.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 {SkRegion::kXOR_Op, "Xor " }, 89 {SkRegion::kXOR_Op, "Xor " },
90 {SkRegion::kReverseDifference_Op, "RDiff "} 90 {SkRegion::kReverseDifference_Op, "RDiff "}
91 }; 91 };
92 92
93 canvas->translate(0, SkIntToScalar(40)); 93 canvas->translate(0, SkIntToScalar(40));
94 canvas->scale(3 * SK_Scalar1 / 4, 3 * SK_Scalar1 / 4); 94 canvas->scale(3 * SK_Scalar1 / 4, 3 * SK_Scalar1 / 4);
95 canvas->save(); 95 canvas->save();
96 96
97 for (int invA = 0; invA < 2; ++invA) { 97 for (int invA = 0; invA < 2; ++invA) {
98 for (size_t op = 0; op < SK_ARRAY_COUNT(gOps); ++op) { 98 for (size_t op = 0; op < SK_ARRAY_COUNT(gOps); ++op) {
99 int idx = invA * SK_ARRAY_COUNT(gOps) + op; 99 size_t idx = invA * SK_ARRAY_COUNT(gOps) + op;
100 if (!(idx % 3)) { 100 if (!(idx % 3)) {
101 canvas->restore(); 101 canvas->restore();
102 canvas->translate(0, SkIntToScalar(250)); 102 canvas->translate(0, SkIntToScalar(250));
103 canvas->save(); 103 canvas->save();
104 } 104 }
105 canvas->save(); 105 canvas->save();
106 // set clip 106 // set clip
107 clipA.setFillType(invA ? SkPath::kInverseEvenOdd_FillType : 107 clipA.setFillType(invA ? SkPath::kInverseEvenOdd_FillType :
108 SkPath::kEvenOdd_FillType); 108 SkPath::kEvenOdd_FillType);
109 canvas->clipPath(clipA); 109 canvas->clipPath(clipA);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } 144 }
145 145
146 private: 146 private:
147 typedef SampleView INHERITED; 147 typedef SampleView INHERITED;
148 }; 148 };
149 149
150 ////////////////////////////////////////////////////////////////////////////// 150 //////////////////////////////////////////////////////////////////////////////
151 151
152 static SkView* MyFactory() { return new ComplexClipView; } 152 static SkView* MyFactory() { return new ComplexClipView; }
153 static SkViewRegister reg(MyFactory); 153 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleApp.cpp ('k') | samplecode/SampleEncode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698