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