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

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

Issue 549143003: Fix bug in layer hoisting transition to SkRecord backend (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT Created 6 years, 3 months 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/GrPictureUtils.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 1869 matching lines...) Expand 10 before | Expand all | Expand 10 after
1880 SkTDArray<GrCachedLayer*> atlased, nonAtlased; 1880 SkTDArray<GrCachedLayer*> atlased, nonAtlased;
1881 atlased.setReserve(gpuData->numSaveLayers()); 1881 atlased.setReserve(gpuData->numSaveLayers());
1882 1882
1883 // Generate the layer and/or ensure it is locked 1883 // Generate the layer and/or ensure it is locked
1884 for (int i = 0; i < gpuData->numSaveLayers(); ++i) { 1884 for (int i = 0; i < gpuData->numSaveLayers(); ++i) {
1885 if (pullForward[i]) { 1885 if (pullForward[i]) {
1886 const GrAccelData::SaveLayerInfo& info = gpuData->saveLayerInfo(i); 1886 const GrAccelData::SaveLayerInfo& info = gpuData->saveLayerInfo(i);
1887 1887
1888 GrCachedLayer* layer = fContext->getLayerCache()->findLayerOrCreate( picture->uniqueID(), 1888 GrCachedLayer* layer = fContext->getLayerCache()->findLayerOrCreate( picture->uniqueID(),
1889 info.fSaveLayerOpID, 1889 info.fSaveLayerOpID,
1890 info.fRestoreOpID, 1890 info.fRestoreOpID,
1891 info.fOffset,
1891 info.fOriginXform); 1892 info.fOriginXform);
1892 1893
1893 GrReplacements::ReplacementInfo* layerInfo = replacements.push(); 1894 GrReplacements::ReplacementInfo* layerInfo = replacements.push();
1894 layerInfo->fStart = info.fSaveLayerOpID; 1895 layerInfo->fStart = info.fSaveLayerOpID;
1895 layerInfo->fStop = info.fRestoreOpID; 1896 layerInfo->fStop = info.fRestoreOpID;
1896 layerInfo->fPos = info.fOffset; 1897 layerInfo->fPos = info.fOffset;
1897 1898
1898 GrTextureDesc desc; 1899 GrTextureDesc desc;
1899 desc.fFlags = kRenderTarget_GrTextureFlagBit; 1900 desc.fFlags = kRenderTarget_GrTextureFlagBit;
1900 desc.fWidth = info.fSize.fWidth; 1901 desc.fWidth = info.fSize.fWidth;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1941 GrLayerHoister::UnlockLayers(fContext->getLayerCache(), picture); 1942 GrLayerHoister::UnlockLayers(fContext->getLayerCache(), picture);
1942 1943
1943 return true; 1944 return true;
1944 } 1945 }
1945 1946
1946 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { 1947 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() {
1947 // We always return a transient cache, so it is freed after each 1948 // We always return a transient cache, so it is freed after each
1948 // filter traversal. 1949 // filter traversal.
1949 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); 1950 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize);
1950 } 1951 }
OLDNEW
« no previous file with comments | « src/gpu/GrPictureUtils.cpp ('k') | tests/GpuLayerCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698