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

Side by Side Diff: src/image/SkSurface_Gpu.cpp

Issue 638403003: Remove uses of GrAutoScratchTexture. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 2 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/SkGr.cpp ('k') | tests/ReadPixelsTest.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 2012 Google Inc. 2 * Copyright 2012 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 "SkSurface_Base.h" 8 #include "SkSurface_Base.h"
9 #include "SkImagePriv.h" 9 #include "SkImagePriv.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 return NULL; 139 return NULL;
140 } 140 }
141 141
142 GrTextureDesc desc; 142 GrTextureDesc desc;
143 desc.fFlags = kRenderTarget_GrTextureFlagBit | kCheckAllocation_GrTextureFla gBit; 143 desc.fFlags = kRenderTarget_GrTextureFlagBit | kCheckAllocation_GrTextureFla gBit;
144 desc.fWidth = info.width(); 144 desc.fWidth = info.width();
145 desc.fHeight = info.height(); 145 desc.fHeight = info.height();
146 desc.fConfig = SkImageInfo2GrPixelConfig(info); 146 desc.fConfig = SkImageInfo2GrPixelConfig(info);
147 desc.fSampleCnt = sampleCount; 147 desc.fSampleCnt = sampleCount;
148 148
149 SkAutoTUnref<GrTexture> tex(ctx->lockAndRefScratchTexture(desc, GrContext::k Exact_ScratchTexMatch)); 149 SkAutoTUnref<GrTexture> tex(ctx->refScratchTexture(desc, GrContext::kExact_S cratchTexMatch));
150 150
151 if (NULL == tex) { 151 if (NULL == tex) {
152 return NULL; 152 return NULL;
153 } 153 }
154 154
155 return SkNEW_ARGS(SkSurface_Gpu, (tex->asRenderTarget(), props, true)); 155 return SkNEW_ARGS(SkSurface_Gpu, (tex->asRenderTarget(), props, true));
156 } 156 }
OLDNEW
« no previous file with comments | « src/gpu/SkGr.cpp ('k') | tests/ReadPixelsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698