| 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 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1730 } | 1730 } |
| 1731 | 1731 |
| 1732 /////////////////////////////////////////////////////////////////////////////// | 1732 /////////////////////////////////////////////////////////////////////////////// |
| 1733 | 1733 |
| 1734 bool SkGpuDevice::onShouldDisableLCD(const SkPaint& paint) const { | 1734 bool SkGpuDevice::onShouldDisableLCD(const SkPaint& paint) const { |
| 1735 return GrTextContext::ShouldDisableLCD(paint); | 1735 return GrTextContext::ShouldDisableLCD(paint); |
| 1736 } | 1736 } |
| 1737 | 1737 |
| 1738 void SkGpuDevice::flush() { | 1738 void SkGpuDevice::flush() { |
| 1739 DO_DEFERRED_CLEAR(); | 1739 DO_DEFERRED_CLEAR(); |
| 1740 fRenderTarget->prepareForExternalRead(); | 1740 fRenderTarget->prepareForExternalIO(); |
| 1741 } | 1741 } |
| 1742 | 1742 |
| 1743 /////////////////////////////////////////////////////////////////////////////// | 1743 /////////////////////////////////////////////////////////////////////////////// |
| 1744 | 1744 |
| 1745 SkBaseDevice* SkGpuDevice::onCreateDevice(const CreateInfo& cinfo, const SkPaint
*) { | 1745 SkBaseDevice* SkGpuDevice::onCreateDevice(const CreateInfo& cinfo, const SkPaint
*) { |
| 1746 GrSurfaceDesc desc; | 1746 GrSurfaceDesc desc; |
| 1747 desc.fConfig = fRenderTarget->config(); | 1747 desc.fConfig = fRenderTarget->config(); |
| 1748 desc.fFlags = kRenderTarget_GrSurfaceFlag; | 1748 desc.fFlags = kRenderTarget_GrSurfaceFlag; |
| 1749 desc.fWidth = cinfo.fInfo.width(); | 1749 desc.fWidth = cinfo.fInfo.width(); |
| 1750 desc.fHeight = cinfo.fInfo.height(); | 1750 desc.fHeight = cinfo.fInfo.height(); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1847 #endif | 1847 #endif |
| 1848 } | 1848 } |
| 1849 | 1849 |
| 1850 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { | 1850 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { |
| 1851 // We always return a transient cache, so it is freed after each | 1851 // We always return a transient cache, so it is freed after each |
| 1852 // filter traversal. | 1852 // filter traversal. |
| 1853 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); | 1853 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); |
| 1854 } | 1854 } |
| 1855 | 1855 |
| 1856 #endif | 1856 #endif |
| OLD | NEW |