| 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 |
| 11 | 11 |
| 12 #include "GrLayerAtlas.h" | 12 #include "GrLayerAtlas.h" |
| 13 #include "GrTexture.h" | 13 #include "GrTexture.h" |
| 14 #include "GrRect.h" | 14 #include "GrRect.h" |
| 15 | 15 |
| 16 #include "SkChecksum.h" | 16 #include "SkChecksum.h" |
| 17 #include "SkImageFilter.h" | 17 #include "SkImageFilter.h" |
| 18 #include "SkMessageBus.h" | 18 #include "SkMessageBus.h" |
| 19 #include "SkPaint.h" | |
| 20 #include "SkPicture.h" | 19 #include "SkPicture.h" |
| 21 #include "SkTDynamicHash.h" | 20 #include "SkTDynamicHash.h" |
| 22 | 21 |
| 23 // Set to 0 to disable caching of hoisted layers | 22 // Set to 0 to disable caching of hoisted layers |
| 24 #define GR_CACHE_HOISTED_LAYERS 0 | 23 #define GR_CACHE_HOISTED_LAYERS 0 |
| 25 | 24 |
| 26 // GrPictureInfo stores the atlas plots used by a single picture. A single | 25 // GrPictureInfo stores the atlas plots used by a single picture. A single |
| 27 // plot may be used to store layers from multiple pictures. | 26 // plot may be used to store layers from multiple pictures. |
| 28 struct GrPictureInfo { | 27 struct GrPictureInfo { |
| 29 public: | 28 public: |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 SkASSERT(fPlotLocks[plotIdx] > 0); | 422 SkASSERT(fPlotLocks[plotIdx] > 0); |
| 424 --fPlotLocks[plotIdx]; | 423 --fPlotLocks[plotIdx]; |
| 425 } | 424 } |
| 426 | 425 |
| 427 // for testing | 426 // for testing |
| 428 friend class TestingAccess; | 427 friend class TestingAccess; |
| 429 int numLayers() const { return fLayerHash.count(); } | 428 int numLayers() const { return fLayerHash.count(); } |
| 430 }; | 429 }; |
| 431 | 430 |
| 432 #endif | 431 #endif |
| OLD | NEW |