| 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 1756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1767 } | 1767 } |
| 1768 | 1768 |
| 1769 void SkGpuDevice::flush() { | 1769 void SkGpuDevice::flush() { |
| 1770 ASSERT_SINGLE_OWNER | 1770 ASSERT_SINGLE_OWNER |
| 1771 | 1771 |
| 1772 fDrawContext->prepareForExternalIO(); | 1772 fDrawContext->prepareForExternalIO(); |
| 1773 } | 1773 } |
| 1774 | 1774 |
| 1775 /////////////////////////////////////////////////////////////////////////////// | 1775 /////////////////////////////////////////////////////////////////////////////// |
| 1776 | 1776 |
| 1777 SkBaseDevice* SkGpuDevice::onCreateDevice(const CreateInfo& cinfo, const SkPaint
*) { | 1777 SkBaseDevice* SkGpuDevice::onCreateDevice(const CreateInfo& cinfo, const SkPaint
*, |
| 1778 SkRasterCanvasLayerAllocator*) { |
| 1778 ASSERT_SINGLE_OWNER | 1779 ASSERT_SINGLE_OWNER |
| 1779 | 1780 |
| 1780 SkSurfaceProps props(this->surfaceProps().flags(), cinfo.fPixelGeometry); | 1781 SkSurfaceProps props(this->surfaceProps().flags(), cinfo.fPixelGeometry); |
| 1781 | 1782 |
| 1782 // layers are never drawn in repeat modes, so we can request an approx | 1783 // layers are never drawn in repeat modes, so we can request an approx |
| 1783 // match and ignore any padding. | 1784 // match and ignore any padding. |
| 1784 SkBackingFit fit = kNever_TileUsage == cinfo.fTileUsage ? SkBackingFit::kApp
rox | 1785 SkBackingFit fit = kNever_TileUsage == cinfo.fTileUsage ? SkBackingFit::kApp
rox |
| 1785 : SkBackingFit::kExa
ct; | 1786 : SkBackingFit::kExa
ct; |
| 1786 | 1787 |
| 1787 sk_sp<GrDrawContext> dc(fContext->makeDrawContext(fit, | 1788 sk_sp<GrDrawContext> dc(fContext->makeDrawContext(fit, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1815 } | 1816 } |
| 1816 | 1817 |
| 1817 SkImageFilterCache* SkGpuDevice::getImageFilterCache() { | 1818 SkImageFilterCache* SkGpuDevice::getImageFilterCache() { |
| 1818 ASSERT_SINGLE_OWNER | 1819 ASSERT_SINGLE_OWNER |
| 1819 // We always return a transient cache, so it is freed after each | 1820 // We always return a transient cache, so it is freed after each |
| 1820 // filter traversal. | 1821 // filter traversal. |
| 1821 return SkImageFilterCache::Create(kDefaultImageFilterCacheSize); | 1822 return SkImageFilterCache::Create(kDefaultImageFilterCacheSize); |
| 1822 } | 1823 } |
| 1823 | 1824 |
| 1824 #endif | 1825 #endif |
| OLD | NEW |