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

Side by Side Diff: gm/texdata.cpp

Issue 864383003: Remove createUncachedTexture function, attempt to recycle scratch in createTexture. (Closed) Base URL: https://skia.googlesource.com/skia.git@continue
Patch Set: Comments, fixes Created 5 years, 10 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 | « no previous file | include/gpu/GrContext.h » ('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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 // This test only works with the GPU backend. 9 // This test only works with the GPU backend.
10 10
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 } 77 }
78 } 78 }
79 79
80 GrSurfaceDesc desc; 80 GrSurfaceDesc desc;
81 // use RT flag bit because in GL it makes the texture be bottom- up 81 // use RT flag bit because in GL it makes the texture be bottom- up
82 desc.fFlags = i ? kRenderTarget_GrSurfaceFlag : 82 desc.fFlags = i ? kRenderTarget_GrSurfaceFlag :
83 kNone_GrSurfaceFlags; 83 kNone_GrSurfaceFlags;
84 desc.fConfig = kSkia8888_GrPixelConfig; 84 desc.fConfig = kSkia8888_GrPixelConfig;
85 desc.fWidth = 2 * S; 85 desc.fWidth = 2 * S;
86 desc.fHeight = 2 * S; 86 desc.fHeight = 2 * S;
87 GrTexture* texture = 87 GrTexture* texture = ctx->createTexture(desc, false, gTextureDat a.get(), 0);
88 ctx->createUncachedTexture(desc, gTextureData.get(), 0);
89 88
90 if (!texture) { 89 if (!texture) {
91 return; 90 return;
92 } 91 }
93 SkAutoTUnref<GrTexture> au(texture); 92 SkAutoTUnref<GrTexture> au(texture);
94 93
95 GrContext::AutoClip acs(ctx, SkRect::MakeWH(2*S, 2*S)); 94 GrContext::AutoClip acs(ctx, SkRect::MakeWH(2*S, 2*S));
96 95
97 ctx->setRenderTarget(target); 96 ctx->setRenderTarget(target);
98 97
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 }; 137 };
139 138
140 ////////////////////////////////////////////////////////////////////////////// 139 //////////////////////////////////////////////////////////////////////////////
141 140
142 static GM* MyFactory(void*) { return new TexDataGM; } 141 static GM* MyFactory(void*) { return new TexDataGM; }
143 static GMRegistry reg(MyFactory); 142 static GMRegistry reg(MyFactory);
144 143
145 } 144 }
146 145
147 #endif 146 #endif
OLDNEW
« no previous file with comments | « no previous file | include/gpu/GrContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698