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