OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 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 | 8 |
9 | 9 |
10 | 10 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 loc->set(x, y); | 46 loc->set(x, y); |
47 return true; | 47 return true; |
48 } | 48 } |
49 busy++; | 49 busy++; |
50 } | 50 } |
51 } | 51 } |
52 return false; | 52 return false; |
53 } | 53 } |
54 | 54 |
55 bool isBusy(int x, int y) const { | 55 bool isBusy(int x, int y) const { |
56 GrAssert((unsigned)x < (unsigned)fDim.fX); | 56 SkASSERT((unsigned)x < (unsigned)fDim.fX); |
57 GrAssert((unsigned)y < (unsigned)fDim.fY); | 57 SkASSERT((unsigned)y < (unsigned)fDim.fY); |
58 return fBusy[y * fDim.fX + x] != 0; | 58 return fBusy[y * fDim.fX + x] != 0; |
59 } | 59 } |
60 | 60 |
61 void freePlot(int x, int y) { | 61 void freePlot(int x, int y) { |
62 GrAssert((unsigned)x < (unsigned)fDim.fX); | 62 SkASSERT((unsigned)x < (unsigned)fDim.fX); |
63 GrAssert((unsigned)y < (unsigned)fDim.fY); | 63 SkASSERT((unsigned)y < (unsigned)fDim.fY); |
64 fBusy[y * fDim.fX + x] = false; | 64 fBusy[y * fDim.fX + x] = false; |
65 } | 65 } |
66 | 66 |
67 private: | 67 private: |
68 enum { | 68 enum { |
69 STORAGE = 64 | 69 STORAGE = 64 |
70 }; | 70 }; |
71 char fStorage[STORAGE]; | 71 char fStorage[STORAGE]; |
72 char* fBusy; | 72 char* fBusy; |
73 GrIPoint16 fDim; | 73 GrIPoint16 fDim; |
74 }; | 74 }; |
75 | 75 |
76 #endif | 76 #endif |
OLD | NEW |