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 "GrBlurUtils.h" | 10 #include "GrBlurUtils.h" |
(...skipping 1726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1737 } | 1737 } |
1738 | 1738 |
1739 void SkGpuDevice::flush() { | 1739 void SkGpuDevice::flush() { |
1740 ASSERT_SINGLE_OWNER | 1740 ASSERT_SINGLE_OWNER |
1741 | 1741 |
1742 fRenderTarget->prepareForExternalIO(); | 1742 fRenderTarget->prepareForExternalIO(); |
1743 } | 1743 } |
1744 | 1744 |
1745 /////////////////////////////////////////////////////////////////////////////// | 1745 /////////////////////////////////////////////////////////////////////////////// |
1746 | 1746 |
1747 SkBaseDevice* SkGpuDevice::onCreateDevice(const CreateInfo& cinfo, const SkPaint
*) { | 1747 SkBaseDevice* SkGpuDevice::onCreateDevice(const SkBaseDevice::CreateInfo& cinfo, |
| 1748 const SkPaint*, |
| 1749 SkRasterCanvasLayerAllocator*) { |
1748 ASSERT_SINGLE_OWNER | 1750 ASSERT_SINGLE_OWNER |
1749 | 1751 |
1750 SkSurfaceProps props(this->surfaceProps().flags(), cinfo.fPixelGeometry); | 1752 SkSurfaceProps props(this->surfaceProps().flags(), cinfo.fPixelGeometry); |
1751 | 1753 |
1752 // layers are never drawn in repeat modes, so we can request an approx | 1754 // layers are never drawn in repeat modes, so we can request an approx |
1753 // match and ignore any padding. | 1755 // match and ignore any padding. |
1754 SkBackingFit fit = kNever_TileUsage == cinfo.fTileUsage ? SkBackingFit::kApp
rox | 1756 SkBackingFit fit = kNever_TileUsage == cinfo.fTileUsage ? SkBackingFit::kApp
rox |
1755 : SkBackingFit::kExa
ct; | 1757 : SkBackingFit::kExa
ct; |
1756 | 1758 |
1757 sk_sp<GrDrawContext> dc(fContext->newDrawContext(fit, | 1759 sk_sp<GrDrawContext> dc(fContext->newDrawContext(fit, |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1857 } | 1859 } |
1858 | 1860 |
1859 SkImageFilterCache* SkGpuDevice::getImageFilterCache() { | 1861 SkImageFilterCache* SkGpuDevice::getImageFilterCache() { |
1860 ASSERT_SINGLE_OWNER | 1862 ASSERT_SINGLE_OWNER |
1861 // We always return a transient cache, so it is freed after each | 1863 // We always return a transient cache, so it is freed after each |
1862 // filter traversal. | 1864 // filter traversal. |
1863 return SkImageFilterCache::Create(kDefaultImageFilterCacheSize); | 1865 return SkImageFilterCache::Create(kDefaultImageFilterCacheSize); |
1864 } | 1866 } |
1865 | 1867 |
1866 #endif | 1868 #endif |
OLD | NEW |