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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 // If no one cares about the layer allow it to be recycled. | 345 // If no one cares about the layer allow it to be recycled. |
346 this->unlock(layer); | 346 this->unlock(layer); |
347 } | 347 } |
348 } | 348 } |
349 | 349 |
350 // Cleanup after any SkPicture deletions | 350 // Cleanup after any SkPicture deletions |
351 void processDeletedPictures(); | 351 void processDeletedPictures(); |
352 | 352 |
353 SkDEBUGCODE(void validate() const;) | 353 SkDEBUGCODE(void validate() const;) |
354 | 354 |
355 #ifdef SK_DEBUG | 355 #ifdef SK_DEVELOPER |
356 void writeLayersToDisk(const SkString& dirName); | 356 void writeLayersToDisk(const SkString& dirName); |
357 #endif | 357 #endif |
358 | 358 |
359 static bool PlausiblyAtlasable(int width, int height) { | 359 static bool PlausiblyAtlasable(int width, int height) { |
360 return width <= kPlotWidth && height <= kPlotHeight; | 360 return width <= kPlotWidth && height <= kPlotHeight; |
361 } | 361 } |
362 | 362 |
363 void begin(); | 363 void begin(); |
364 void end(); | 364 void end(); |
365 | 365 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 SkASSERT(fPlotLocks[plotIdx] > 0); | 423 SkASSERT(fPlotLocks[plotIdx] > 0); |
424 --fPlotLocks[plotIdx]; | 424 --fPlotLocks[plotIdx]; |
425 } | 425 } |
426 | 426 |
427 // for testing | 427 // for testing |
428 friend class TestingAccess; | 428 friend class TestingAccess; |
429 int numLayers() const { return fLayerHash.count(); } | 429 int numLayers() const { return fLayerHash.count(); } |
430 }; | 430 }; |
431 | 431 |
432 #endif | 432 #endif |
OLD | NEW |