Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: src/gpu/SkGpuDevice.cpp

Issue 709943003: Address MSAA rendering in layer hoisting (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/GrLayerHoister.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "effects/GrBicubicEffect.h" 10 #include "effects/GrBicubicEffect.h"
(...skipping 1806 matching lines...) Expand 10 before | Expand all | Expand 10 after
1817 1817
1818 SkRect clipBounds; 1818 SkRect clipBounds;
1819 if (!mainCanvas->getClipBounds(&clipBounds)) { 1819 if (!mainCanvas->getClipBounds(&clipBounds)) {
1820 return true; 1820 return true;
1821 } 1821 }
1822 1822
1823 SkTDArray<GrHoistedLayer> atlasedNeedRendering, atlasedRecycled; 1823 SkTDArray<GrHoistedLayer> atlasedNeedRendering, atlasedRecycled;
1824 1824
1825 GrLayerHoister::FindLayersToAtlas(fContext, mainPicture, 1825 GrLayerHoister::FindLayersToAtlas(fContext, mainPicture,
1826 clipBounds, 1826 clipBounds,
1827 &atlasedNeedRendering, &atlasedRecycled); 1827 &atlasedNeedRendering, &atlasedRecycled,
1828 fRenderTarget->numSamples());
1828 1829
1829 GrLayerHoister::DrawLayersToAtlas(fContext, atlasedNeedRendering); 1830 GrLayerHoister::DrawLayersToAtlas(fContext, atlasedNeedRendering);
1830 1831
1831 SkTDArray<GrHoistedLayer> needRendering, recycled; 1832 SkTDArray<GrHoistedLayer> needRendering, recycled;
1832 1833
1833 GrLayerHoister::FindLayersToHoist(fContext, mainPicture, 1834 GrLayerHoister::FindLayersToHoist(fContext, mainPicture,
1834 clipBounds, 1835 clipBounds,
1835 &needRendering, &recycled); 1836 &needRendering, &recycled,
1837 fRenderTarget->numSamples());
1836 1838
1837 GrLayerHoister::DrawLayers(fContext, needRendering); 1839 GrLayerHoister::DrawLayers(fContext, needRendering);
1838 1840
1839 GrReplacements replacements; 1841 GrReplacements replacements;
1840 1842
1841 GrLayerHoister::ConvertLayersToReplacements(needRendering, &replacements); 1843 GrLayerHoister::ConvertLayersToReplacements(needRendering, &replacements);
1842 GrLayerHoister::ConvertLayersToReplacements(recycled, &replacements); 1844 GrLayerHoister::ConvertLayersToReplacements(recycled, &replacements);
1843 1845
1844 // Render the entire picture using new layers 1846 // Render the entire picture using new layers
1845 const SkMatrix initialMatrix = mainCanvas->getTotalMatrix(); 1847 const SkMatrix initialMatrix = mainCanvas->getTotalMatrix();
1846 1848
1847 GrRecordReplaceDraw(mainPicture, mainCanvas, &replacements, initialMatrix, N ULL); 1849 GrRecordReplaceDraw(mainPicture, mainCanvas, &replacements, initialMatrix, N ULL);
1848 1850
1849 GrLayerHoister::UnlockLayers(fContext, needRendering); 1851 GrLayerHoister::UnlockLayers(fContext, needRendering);
1850 GrLayerHoister::UnlockLayers(fContext, recycled); 1852 GrLayerHoister::UnlockLayers(fContext, recycled);
1851 GrLayerHoister::UnlockLayers(fContext, atlasedNeedRendering); 1853 GrLayerHoister::UnlockLayers(fContext, atlasedNeedRendering);
1852 GrLayerHoister::UnlockLayers(fContext, atlasedRecycled); 1854 GrLayerHoister::UnlockLayers(fContext, atlasedRecycled);
1853 1855
1854 return true; 1856 return true;
1855 } 1857 }
1856 1858
1857 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { 1859 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() {
1858 // We always return a transient cache, so it is freed after each 1860 // We always return a transient cache, so it is freed after each
1859 // filter traversal. 1861 // filter traversal.
1860 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); 1862 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize);
1861 } 1863 }
1862 1864
1863 #endif 1865 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrLayerHoister.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698