| 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 "GrLayerCache.h" | 8 #include "GrLayerCache.h" |
| 9 #include "GrLayerHoister.h" | 9 #include "GrLayerHoister.h" |
| 10 #include "GrRecordReplaceDraw.h" | 10 #include "GrRecordReplaceDraw.h" |
| 11 | 11 |
| 12 #include "SkBigPicture.h" | 12 #include "SkBigPicture.h" |
| 13 #include "SkCanvas.h" | 13 #include "SkCanvas.h" |
| 14 #include "SkDeviceProperties.h" | |
| 15 #include "SkGpuDevice.h" | 14 #include "SkGpuDevice.h" |
| 16 #include "SkGrPixelRef.h" | 15 #include "SkGrPixelRef.h" |
| 17 #include "SkLayerInfo.h" | 16 #include "SkLayerInfo.h" |
| 18 #include "SkRecordDraw.h" | 17 #include "SkRecordDraw.h" |
| 19 #include "SkSurface.h" | 18 #include "SkSurface.h" |
| 20 #include "SkSurface_Gpu.h" | 19 #include "SkSurface_Gpu.h" |
| 21 | 20 |
| 22 // Create the layer information for the hoisted layer and secure the | 21 // Create the layer information for the hoisted layer and secure the |
| 23 // required texture/render target resources. | 22 // required texture/render target resources. |
| 24 static void prepare_for_hoisting(GrLayerCache* layerCache, | 23 static void prepare_for_hoisting(GrLayerCache* layerCache, |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 void GrLayerHoister::PurgeCache(GrContext* context) { | 383 void GrLayerHoister::PurgeCache(GrContext* context) { |
| 385 #if !GR_CACHE_HOISTED_LAYERS | 384 #if !GR_CACHE_HOISTED_LAYERS |
| 386 GrLayerCache* layerCache = context->getLayerCache(); | 385 GrLayerCache* layerCache = context->getLayerCache(); |
| 387 | 386 |
| 388 // This code completely clears out the atlas. It is required when | 387 // This code completely clears out the atlas. It is required when |
| 389 // caching is disabled so the atlas doesn't fill up and force more | 388 // caching is disabled so the atlas doesn't fill up and force more |
| 390 // free floating layers | 389 // free floating layers |
| 391 layerCache->purgeAll(); | 390 layerCache->purgeAll(); |
| 392 #endif | 391 #endif |
| 393 } | 392 } |
| OLD | NEW |