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 1764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1775 static const SkBudgeted kBudgeted = SkBudgeted::kNo; | 1775 static const SkBudgeted kBudgeted = SkBudgeted::kNo; |
1776 return SkSurface::MakeRenderTarget(fContext, kBudgeted, info, fRenderTarget-
>desc().fSampleCnt, | 1776 return SkSurface::MakeRenderTarget(fContext, kBudgeted, info, fRenderTarget-
>desc().fSampleCnt, |
1777 &props); | 1777 &props); |
1778 } | 1778 } |
1779 | 1779 |
1780 bool SkGpuDevice::EXPERIMENTAL_drawPicture(SkCanvas* mainCanvas, const SkPicture
* mainPicture, | 1780 bool SkGpuDevice::EXPERIMENTAL_drawPicture(SkCanvas* mainCanvas, const SkPicture
* mainPicture, |
1781 const SkMatrix* matrix, const SkPaint
* paint) { | 1781 const SkMatrix* matrix, const SkPaint
* paint) { |
1782 ASSERT_SINGLE_OWNER | 1782 ASSERT_SINGLE_OWNER |
1783 #ifndef SK_IGNORE_GPU_LAYER_HOISTING | 1783 #ifndef SK_IGNORE_GPU_LAYER_HOISTING |
1784 // todo: should handle this natively | 1784 // todo: should handle this natively |
1785 if (paint || | 1785 if (paint) { |
1786 (kRGBA_8888_SkColorType != mainCanvas->imageInfo().colorType() && | |
1787 kBGRA_8888_SkColorType != mainCanvas->imageInfo().colorType())) { | |
1788 return false; | 1786 return false; |
1789 } | 1787 } |
1790 | 1788 |
1791 const SkBigPicture::AccelData* data = nullptr; | 1789 const SkBigPicture::AccelData* data = nullptr; |
1792 if (const SkBigPicture* bp = mainPicture->asSkBigPicture()) { | 1790 if (const SkBigPicture* bp = mainPicture->asSkBigPicture()) { |
1793 data = bp->accelData(); | 1791 data = bp->accelData(); |
1794 } | 1792 } |
1795 if (!data) { | 1793 if (!data) { |
1796 return false; | 1794 return false; |
1797 } | 1795 } |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1851 } | 1849 } |
1852 | 1850 |
1853 SkImageFilterCache* SkGpuDevice::getImageFilterCache() { | 1851 SkImageFilterCache* SkGpuDevice::getImageFilterCache() { |
1854 ASSERT_SINGLE_OWNER | 1852 ASSERT_SINGLE_OWNER |
1855 // We always return a transient cache, so it is freed after each | 1853 // We always return a transient cache, so it is freed after each |
1856 // filter traversal. | 1854 // filter traversal. |
1857 return SkImageFilterCache::Create(kDefaultImageFilterCacheSize); | 1855 return SkImageFilterCache::Create(kDefaultImageFilterCacheSize); |
1858 } | 1856 } |
1859 | 1857 |
1860 #endif | 1858 #endif |
OLD | NEW |