| 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 #include "GrContext.h" | |
| 9 #include "GrLayerCache.h" | |
| 10 #include "GrLayerHoister.h" | |
| 11 #include "GrRecordReplaceDraw.h" | |
| 12 | |
| 13 #include "SkBigPicture.h" | 8 #include "SkBigPicture.h" |
| 14 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 15 #include "SkImageFilterCache.h" | 10 #include "SkImageFilterCache.h" |
| 16 #include "SkLayerInfo.h" | 11 #include "SkLayerInfo.h" |
| 17 #include "SkRecordDraw.h" | 12 #include "SkRecordDraw.h" |
| 18 #include "SkSpecialImage.h" | 13 #include "SkSpecialImage.h" |
| 19 #include "SkSurface.h" | 14 #include "SkSurface.h" |
| 20 | 15 |
| 16 #include "GrLayerHoister.h" |
| 17 |
| 18 #if !defined(SK_IGNORE_GPU_LAYER_HOISTING) && SK_SUPPORT_GPU |
| 19 |
| 20 #include "GrContext.h" |
| 21 #include "GrLayerCache.h" |
| 22 #include "GrRecordReplaceDraw.h" |
| 23 |
| 21 // Create the layer information for the hoisted layer and secure the | 24 // Create the layer information for the hoisted layer and secure the |
| 22 // required texture/render target resources. | 25 // required texture/render target resources. |
| 23 static void prepare_for_hoisting(GrLayerCache* layerCache, | 26 static void prepare_for_hoisting(GrLayerCache* layerCache, |
| 24 const SkPicture* topLevelPicture, | 27 const SkPicture* topLevelPicture, |
| 25 const SkMatrix& initialMat, | 28 const SkMatrix& initialMat, |
| 26 const SkLayerInfo::BlockInfo& info, | 29 const SkLayerInfo::BlockInfo& info, |
| 27 const SkIRect& srcIR, | 30 const SkIRect& srcIR, |
| 28 const SkIRect& dstIR, | 31 const SkIRect& dstIR, |
| 29 SkTDArray<GrHoistedLayer>* needRendering, | 32 SkTDArray<GrHoistedLayer>* needRendering, |
| 30 SkTDArray<GrHoistedLayer>* recycled, | 33 SkTDArray<GrHoistedLayer>* recycled, |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 #if !GR_CACHE_HOISTED_LAYERS | 391 #if !GR_CACHE_HOISTED_LAYERS |
| 389 | 392 |
| 390 // This code completely clears out the atlas. It is required when | 393 // This code completely clears out the atlas. It is required when |
| 391 // caching is disabled so the atlas doesn't fill up and force more | 394 // caching is disabled so the atlas doesn't fill up and force more |
| 392 // free floating layers | 395 // free floating layers |
| 393 layerCache->purgeAll(); | 396 layerCache->purgeAll(); |
| 394 #endif | 397 #endif |
| 395 | 398 |
| 396 layerCache->end(); | 399 layerCache->end(); |
| 397 } | 400 } |
| 401 |
| 402 #endif |
| OLD | NEW |