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 1748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1759 } | 1759 } |
1760 | 1760 |
1761 void SkGpuDevice::flush() { | 1761 void SkGpuDevice::flush() { |
1762 ASSERT_SINGLE_OWNER | 1762 ASSERT_SINGLE_OWNER |
1763 | 1763 |
1764 fRenderTarget->prepareForExternalIO(); | 1764 fRenderTarget->prepareForExternalIO(); |
1765 } | 1765 } |
1766 | 1766 |
1767 /////////////////////////////////////////////////////////////////////////////// | 1767 /////////////////////////////////////////////////////////////////////////////// |
1768 | 1768 |
1769 SkBaseDevice* SkGpuDevice::onCreateDevice(const CreateInfo& cinfo, const SkPaint
*) { | 1769 SkBaseDevice* SkGpuDevice::onCreateDevice(const SkBaseDevice::CreateInfo& cinfo, |
| 1770 const SkPaint*, |
| 1771 SkRasterCanvasLayerAllocator*) { |
1770 ASSERT_SINGLE_OWNER | 1772 ASSERT_SINGLE_OWNER |
1771 GrSurfaceDesc desc; | 1773 GrSurfaceDesc desc; |
1772 desc.fConfig = fRenderTarget->config(); | 1774 desc.fConfig = fRenderTarget->config(); |
1773 desc.fFlags = kRenderTarget_GrSurfaceFlag; | 1775 desc.fFlags = kRenderTarget_GrSurfaceFlag; |
1774 desc.fWidth = cinfo.fInfo.width(); | 1776 desc.fWidth = cinfo.fInfo.width(); |
1775 desc.fHeight = cinfo.fInfo.height(); | 1777 desc.fHeight = cinfo.fInfo.height(); |
1776 desc.fSampleCnt = fRenderTarget->desc().fSampleCnt; | 1778 desc.fSampleCnt = fRenderTarget->desc().fSampleCnt; |
1777 | 1779 |
1778 SkAutoTUnref<GrTexture> texture; | 1780 SkAutoTUnref<GrTexture> texture; |
1779 // Skia's convention is to only clear a device if it is non-opaque. | 1781 // Skia's convention is to only clear a device if it is non-opaque. |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1883 } | 1885 } |
1884 | 1886 |
1885 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { | 1887 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { |
1886 ASSERT_SINGLE_OWNER | 1888 ASSERT_SINGLE_OWNER |
1887 // We always return a transient cache, so it is freed after each | 1889 // We always return a transient cache, so it is freed after each |
1888 // filter traversal. | 1890 // filter traversal. |
1889 return SkGpuDevice::NewImageFilterCache(); | 1891 return SkGpuDevice::NewImageFilterCache(); |
1890 } | 1892 } |
1891 | 1893 |
1892 #endif | 1894 #endif |
OLD | NEW |