OLD | NEW |
1 | |
2 /* | 1 /* |
3 * Copyright 2010 Google Inc. | 2 * Copyright 2010 Google Inc. |
4 * | 3 * |
5 * 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 |
6 * found in the LICENSE file. | 5 * found in the LICENSE file. |
7 */ | 6 */ |
8 | 7 |
9 | |
10 | |
11 #ifndef GrPlotMgr_DEFINED | 8 #ifndef GrPlotMgr_DEFINED |
12 #define GrPlotMgr_DEFINED | 9 #define GrPlotMgr_DEFINED |
13 | 10 |
14 #include "GrTypes.h" | 11 #include "GrTypes.h" |
15 #include "GrPoint.h" | 12 #include "GrPoint.h" |
| 13 #include "SkTypes.h" |
16 | 14 |
17 class GrPlotMgr : GrNoncopyable { | 15 class GrPlotMgr : public SkNoncopyable { |
18 public: | 16 public: |
19 GrPlotMgr(int width, int height) { | 17 GrPlotMgr(int width, int height) { |
20 fDim.set(width, height); | 18 fDim.set(width, height); |
21 size_t needed = width * height; | 19 size_t needed = width * height; |
22 if (needed <= sizeof(fStorage)) { | 20 if (needed <= sizeof(fStorage)) { |
23 fBusy = fStorage; | 21 fBusy = fStorage; |
24 } else { | 22 } else { |
25 fBusy = SkNEW_ARRAY(char, needed); | 23 fBusy = SkNEW_ARRAY(char, needed); |
26 } | 24 } |
27 this->reset(); | 25 this->reset(); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 private: | 65 private: |
68 enum { | 66 enum { |
69 STORAGE = 64 | 67 STORAGE = 64 |
70 }; | 68 }; |
71 char fStorage[STORAGE]; | 69 char fStorage[STORAGE]; |
72 char* fBusy; | 70 char* fBusy; |
73 GrIPoint16 fDim; | 71 GrIPoint16 fDim; |
74 }; | 72 }; |
75 | 73 |
76 #endif | 74 #endif |
OLD | NEW |