| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "SkGpuDevice.h" | 8 #include "SkGpuDevice.h" |
| 9 | 9 |
| 10 #include "effects/GrBicubicEffect.h" | 10 #include "effects/GrBicubicEffect.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 #include "SkRecord.h" | 36 #include "SkRecord.h" |
| 37 #include "SkRRect.h" | 37 #include "SkRRect.h" |
| 38 #include "SkStroke.h" | 38 #include "SkStroke.h" |
| 39 #include "SkSurface.h" | 39 #include "SkSurface.h" |
| 40 #include "SkTLazy.h" | 40 #include "SkTLazy.h" |
| 41 #include "SkUtils.h" | 41 #include "SkUtils.h" |
| 42 #include "SkVertState.h" | 42 #include "SkVertState.h" |
| 43 #include "SkXfermode.h" | 43 #include "SkXfermode.h" |
| 44 #include "SkErrorInternals.h" | 44 #include "SkErrorInternals.h" |
| 45 | 45 |
| 46 #if SK_SUPPORT_GPU |
| 47 |
| 46 enum { kDefaultImageFilterCacheSize = 32 * 1024 * 1024 }; | 48 enum { kDefaultImageFilterCacheSize = 32 * 1024 * 1024 }; |
| 47 | 49 |
| 48 #define CACHE_COMPATIBLE_DEVICE_TEXTURES 1 | 50 #define CACHE_COMPATIBLE_DEVICE_TEXTURES 1 |
| 49 | 51 |
| 50 #if 0 | 52 #if 0 |
| 51 extern bool (*gShouldDrawProc)(); | 53 extern bool (*gShouldDrawProc)(); |
| 52 #define CHECK_SHOULD_DRAW(draw, forceI) \ | 54 #define CHECK_SHOULD_DRAW(draw, forceI) \ |
| 53 do { \ | 55 do { \ |
| 54 if (gShouldDrawProc && !gShouldDrawProc()) return; \ | 56 if (gShouldDrawProc && !gShouldDrawProc()) return; \ |
| 55 this->prepareDraw(draw, forceI); \ | 57 this->prepareDraw(draw, forceI); \ |
| (...skipping 1792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1848 GrLayerHoister::UnlockLayers(fContext, atlasedRecycled); | 1850 GrLayerHoister::UnlockLayers(fContext, atlasedRecycled); |
| 1849 | 1851 |
| 1850 return true; | 1852 return true; |
| 1851 } | 1853 } |
| 1852 | 1854 |
| 1853 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { | 1855 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { |
| 1854 // We always return a transient cache, so it is freed after each | 1856 // We always return a transient cache, so it is freed after each |
| 1855 // filter traversal. | 1857 // filter traversal. |
| 1856 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); | 1858 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); |
| 1857 } | 1859 } |
| 1860 |
| 1861 #endif |
| OLD | NEW |