| 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" |
| 11 #include "effects/GrDashingEffect.h" | 11 #include "effects/GrDashingEffect.h" |
| 12 #include "effects/GrTextureDomain.h" | 12 #include "effects/GrTextureDomain.h" |
| 13 #include "effects/GrSimpleTextureEffect.h" | 13 #include "effects/GrSimpleTextureEffect.h" |
| 14 | 14 |
| 15 #include "GrContext.h" | 15 #include "GrContext.h" |
| 16 #include "GrBitmapTextContext.h" | 16 #include "GrBitmapTextContext.h" |
| 17 #include "GrDistanceFieldTextContext.h" | 17 #include "GrDistanceFieldTextContext.h" |
| 18 #include "GrLayerCache.h" | |
| 19 #include "GrLayerHoister.h" | 18 #include "GrLayerHoister.h" |
| 20 #include "GrPictureUtils.h" | |
| 21 #include "GrRecordReplaceDraw.h" | 19 #include "GrRecordReplaceDraw.h" |
| 22 #include "GrStrokeInfo.h" | 20 #include "GrStrokeInfo.h" |
| 23 #include "GrTracing.h" | 21 #include "GrTracing.h" |
| 24 #include "GrGpu.h" | 22 #include "GrGpu.h" |
| 25 | 23 |
| 26 #include "SkGrTexturePixelRef.h" | 24 #include "SkGrTexturePixelRef.h" |
| 27 | 25 |
| 28 #include "SkDeviceImageFilterProxy.h" | 26 #include "SkDeviceImageFilterProxy.h" |
| 29 #include "SkDrawProcs.h" | 27 #include "SkDrawProcs.h" |
| 30 #include "SkGlyphCache.h" | 28 #include "SkGlyphCache.h" |
| 31 #include "SkImageFilter.h" | 29 #include "SkImageFilter.h" |
| 30 #include "SkLayerInfo.h" |
| 32 #include "SkMaskFilter.h" | 31 #include "SkMaskFilter.h" |
| 33 #include "SkPathEffect.h" | 32 #include "SkPathEffect.h" |
| 34 #include "SkPicture.h" | 33 #include "SkPicture.h" |
| 35 #include "SkPictureData.h" | 34 #include "SkPictureData.h" |
| 36 #include "SkRecord.h" | 35 #include "SkRecord.h" |
| 37 #include "SkRRect.h" | 36 #include "SkRRect.h" |
| 38 #include "SkStroke.h" | 37 #include "SkStroke.h" |
| 39 #include "SkSurface.h" | 38 #include "SkSurface.h" |
| 40 #include "SkTLazy.h" | 39 #include "SkTLazy.h" |
| 41 #include "SkUtils.h" | 40 #include "SkUtils.h" |
| (...skipping 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1789 return SkSurface::NewRenderTarget(fContext, info, fRenderTarget->numSamples(
), &props); | 1788 return SkSurface::NewRenderTarget(fContext, info, fRenderTarget->numSamples(
), &props); |
| 1790 } | 1789 } |
| 1791 | 1790 |
| 1792 bool SkGpuDevice::EXPERIMENTAL_drawPicture(SkCanvas* mainCanvas, const SkPicture
* mainPicture, | 1791 bool SkGpuDevice::EXPERIMENTAL_drawPicture(SkCanvas* mainCanvas, const SkPicture
* mainPicture, |
| 1793 const SkMatrix* matrix, const SkPaint
* paint) { | 1792 const SkMatrix* matrix, const SkPaint
* paint) { |
| 1794 // todo: should handle these natively | 1793 // todo: should handle these natively |
| 1795 if (matrix || paint) { | 1794 if (matrix || paint) { |
| 1796 return false; | 1795 return false; |
| 1797 } | 1796 } |
| 1798 | 1797 |
| 1799 SkPicture::AccelData::Key key = GrAccelData::ComputeAccelDataKey(); | 1798 SkPicture::AccelData::Key key = SkLayerInfo::ComputeKey(); |
| 1800 | 1799 |
| 1801 const SkPicture::AccelData* data = mainPicture->EXPERIMENTAL_getAccelData(ke
y); | 1800 const SkPicture::AccelData* data = mainPicture->EXPERIMENTAL_getAccelData(ke
y); |
| 1802 if (!data) { | 1801 if (!data) { |
| 1803 return false; | 1802 return false; |
| 1804 } | 1803 } |
| 1805 | 1804 |
| 1806 SkRect clipBounds; | 1805 SkRect clipBounds; |
| 1807 if (!mainCanvas->getClipBounds(&clipBounds)) { | 1806 if (!mainCanvas->getClipBounds(&clipBounds)) { |
| 1808 return true; | 1807 return true; |
| 1809 } | 1808 } |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1844 return true; | 1843 return true; |
| 1845 } | 1844 } |
| 1846 | 1845 |
| 1847 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { | 1846 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { |
| 1848 // We always return a transient cache, so it is freed after each | 1847 // We always return a transient cache, so it is freed after each |
| 1849 // filter traversal. | 1848 // filter traversal. |
| 1850 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); | 1849 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); |
| 1851 } | 1850 } |
| 1852 | 1851 |
| 1853 #endif | 1852 #endif |
| OLD | NEW |