OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 GrLayerCache_DEFINED | 8 #ifndef GrLayerCache_DEFINED |
9 #define GrLayerCache_DEFINED | 9 #define GrLayerCache_DEFINED |
10 | 10 |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 } | 215 } |
216 | 216 |
217 // Setup to be notified when 'picture' is deleted | 217 // Setup to be notified when 'picture' is deleted |
218 void trackPicture(const SkPicture* picture); | 218 void trackPicture(const SkPicture* picture); |
219 | 219 |
220 // Cleanup after any SkPicture deletions | 220 // Cleanup after any SkPicture deletions |
221 void processDeletedPictures(); | 221 void processDeletedPictures(); |
222 | 222 |
223 SkDEBUGCODE(void validate() const;) | 223 SkDEBUGCODE(void validate() const;) |
224 | 224 |
| 225 #ifdef SK_DEVELOPER |
| 226 void writeLayersToDisk(const SkString& dirName); |
| 227 #endif |
| 228 |
225 private: | 229 private: |
226 static const int kAtlasTextureWidth = 1024; | 230 static const int kAtlasTextureWidth = 1024; |
227 static const int kAtlasTextureHeight = 1024; | 231 static const int kAtlasTextureHeight = 1024; |
228 | 232 |
229 static const int kNumPlotsX = 2; | 233 static const int kNumPlotsX = 2; |
230 static const int kNumPlotsY = 2; | 234 static const int kNumPlotsY = 2; |
231 | 235 |
232 static const int kPlotWidth = kAtlasTextureWidth / kNumPlotsX; | 236 static const int kPlotWidth = kAtlasTextureWidth / kNumPlotsX; |
233 static const int kPlotHeight = kAtlasTextureHeight / kNumPlotsY; | 237 static const int kPlotHeight = kAtlasTextureHeight / kNumPlotsY; |
234 | 238 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 SkASSERT(fPlotLocks[plotIdx] > 0); | 287 SkASSERT(fPlotLocks[plotIdx] > 0); |
284 --fPlotLocks[plotIdx]; | 288 --fPlotLocks[plotIdx]; |
285 } | 289 } |
286 | 290 |
287 // for testing | 291 // for testing |
288 friend class TestingAccess; | 292 friend class TestingAccess; |
289 int numLayers() const { return fLayerHash.count(); } | 293 int numLayers() const { return fLayerHash.count(); } |
290 }; | 294 }; |
291 | 295 |
292 #endif | 296 #endif |
OLD | NEW |