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

Side by Side Diff: gm/texdata.cpp

Issue 682223002: rename GrTextureDesc->GrSurfaceDesc, GrTextureFlags->GrSurfaceFlags (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: const Created 6 years, 1 month 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 | « gm/gmmain.cpp ('k') | gm/xfermodes3.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 /* 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } 71 }
72 } 72 }
73 // fill lower right 73 // fill lower right
74 offset = S * stride + S; 74 offset = S * stride + S;
75 for (int y = 0; y < S; ++y) { 75 for (int y = 0; y < S; ++y) {
76 for (int x = 0; x < S; ++x) { 76 for (int x = 0; x < S; ++x) {
77 gTextureData[offset + y * stride + x] = gray; 77 gTextureData[offset + y * stride + x] = gray;
78 } 78 }
79 } 79 }
80 80
81 GrTextureDesc desc; 81 GrSurfaceDesc desc;
82 // use RT flag bit because in GL it makes the texture be bottom- up 82 // use RT flag bit because in GL it makes the texture be bottom- up
83 desc.fFlags = i ? kRenderTarget_GrTextureFlagBit : 83 desc.fFlags = i ? kRenderTarget_GrSurfaceFlag :
84 kNone_GrTextureFlags; 84 kNone_GrSurfaceFlags;
85 desc.fConfig = kSkia8888_GrPixelConfig; 85 desc.fConfig = kSkia8888_GrPixelConfig;
86 desc.fWidth = 2 * S; 86 desc.fWidth = 2 * S;
87 desc.fHeight = 2 * S; 87 desc.fHeight = 2 * S;
88 GrTexture* texture = 88 GrTexture* texture =
89 ctx->createUncachedTexture(desc, gTextureData.get(), 0); 89 ctx->createUncachedTexture(desc, gTextureData.get(), 0);
90 90
91 if (!texture) { 91 if (!texture) {
92 return; 92 return;
93 } 93 }
94 SkAutoTUnref<GrTexture> au(texture); 94 SkAutoTUnref<GrTexture> au(texture);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 }; 137 };
138 138
139 ////////////////////////////////////////////////////////////////////////////// 139 //////////////////////////////////////////////////////////////////////////////
140 140
141 static GM* MyFactory(void*) { return new TexDataGM; } 141 static GM* MyFactory(void*) { return new TexDataGM; }
142 static GMRegistry reg(MyFactory); 142 static GMRegistry reg(MyFactory);
143 143
144 } 144 }
145 145
146 #endif 146 #endif
OLDNEW
« no previous file with comments | « gm/gmmain.cpp ('k') | gm/xfermodes3.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698