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

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

Issue 265763008: Fix memory leak in GPU Picture optimization (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/GrPictureUtils.h ('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 1895 matching lines...) Expand 10 before | Expand all | Expand 10 after
1906 } 1906 }
1907 } 1907 }
1908 1908
1909 SkSurface* SkGpuDevice::newSurface(const SkImageInfo& info) { 1909 SkSurface* SkGpuDevice::newSurface(const SkImageInfo& info) {
1910 return SkSurface::NewRenderTarget(fContext, info, fRenderTarget->numSamples( )); 1910 return SkSurface::NewRenderTarget(fContext, info, fRenderTarget->numSamples( ));
1911 } 1911 }
1912 1912
1913 void SkGpuDevice::EXPERIMENTAL_optimize(SkPicture* picture) { 1913 void SkGpuDevice::EXPERIMENTAL_optimize(SkPicture* picture) {
1914 SkPicture::AccelData::Key key = GPUAccelData::ComputeAccelDataKey(); 1914 SkPicture::AccelData::Key key = GPUAccelData::ComputeAccelDataKey();
1915 1915
1916 GPUAccelData* data = SkNEW_ARGS(GPUAccelData, (key)); 1916 SkAutoTUnref<GPUAccelData> data(SkNEW_ARGS(GPUAccelData, (key)));
1917 1917
1918 picture->EXPERIMENTAL_addAccelData(data); 1918 picture->EXPERIMENTAL_addAccelData(data);
1919 1919
1920 GatherGPUInfo(picture, data); 1920 GatherGPUInfo(picture, data);
1921 } 1921 }
1922 1922
1923 void SkGpuDevice::EXPERIMENTAL_purge(SkPicture* picture) { 1923 void SkGpuDevice::EXPERIMENTAL_purge(SkPicture* picture) {
1924 1924
1925 } 1925 }
1926 1926
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1960 const GPUAccelData::SaveLayerInfo& info = gpuData->saveLayerInfo(j); 1960 const GPUAccelData::SaveLayerInfo& info = gpuData->saveLayerInfo(j);
1961 1961
1962 if (ops.offset(i) > info.fSaveLayerOpID && ops.offset(i) < info.fRes toreOpID) { 1962 if (ops.offset(i) > info.fSaveLayerOpID && ops.offset(i) < info.fRes toreOpID) {
1963 pullForward[j] = true; 1963 pullForward[j] = true;
1964 } 1964 }
1965 } 1965 }
1966 } 1966 }
1967 1967
1968 return false; 1968 return false;
1969 } 1969 }
OLDNEW
« no previous file with comments | « src/gpu/GrPictureUtils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698