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

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

Issue 769533004: Fuse GrReplacements and GrLayerCache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: clang Created 6 years 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/GrRecordReplaceDraw.cpp ('k') | tests/GpuLayerCacheTest.cpp » ('j') | 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 1812 matching lines...) Expand 10 before | Expand all | Expand 10 after
1823 SkTDArray<GrHoistedLayer> needRendering, recycled; 1823 SkTDArray<GrHoistedLayer> needRendering, recycled;
1824 1824
1825 GrLayerHoister::FindLayersToHoist(fContext, mainPicture, 1825 GrLayerHoister::FindLayersToHoist(fContext, mainPicture,
1826 initialMatrix, 1826 initialMatrix,
1827 clipBounds, 1827 clipBounds,
1828 &needRendering, &recycled, 1828 &needRendering, &recycled,
1829 fRenderTarget->numSamples()); 1829 fRenderTarget->numSamples());
1830 1830
1831 GrLayerHoister::DrawLayers(fContext, needRendering); 1831 GrLayerHoister::DrawLayers(fContext, needRendering);
1832 1832
1833 GrReplacements replacements;
1834
1835 GrLayerHoister::ConvertLayersToReplacements(mainPicture, needRendering, &rep lacements);
1836 GrLayerHoister::ConvertLayersToReplacements(mainPicture, recycled, &replacem ents);
1837
1838 // Render the entire picture using new layers 1833 // Render the entire picture using new layers
1839 GrRecordReplaceDraw(mainPicture, mainCanvas, &replacements, initialMatrix, N ULL); 1834 GrRecordReplaceDraw(mainPicture, mainCanvas, fContext->getLayerCache(),
1835 initialMatrix, NULL);
1840 1836
1841 GrLayerHoister::UnlockLayers(fContext, needRendering); 1837 GrLayerHoister::UnlockLayers(fContext, needRendering);
1842 GrLayerHoister::UnlockLayers(fContext, recycled); 1838 GrLayerHoister::UnlockLayers(fContext, recycled);
1843 GrLayerHoister::UnlockLayers(fContext, atlasedNeedRendering); 1839 GrLayerHoister::UnlockLayers(fContext, atlasedNeedRendering);
1844 GrLayerHoister::UnlockLayers(fContext, atlasedRecycled); 1840 GrLayerHoister::UnlockLayers(fContext, atlasedRecycled);
1845 1841
1846 return true; 1842 return true;
1847 } 1843 }
1848 1844
1849 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { 1845 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() {
1850 // We always return a transient cache, so it is freed after each 1846 // We always return a transient cache, so it is freed after each
1851 // filter traversal. 1847 // filter traversal.
1852 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); 1848 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize);
1853 } 1849 }
1854 1850
1855 #endif 1851 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrRecordReplaceDraw.cpp ('k') | tests/GpuLayerCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698