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

Side by Side Diff: gm/texdata.cpp

Issue 1107973004: Pull cache out of GrContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fixpicturerenderer.cpp Created 5 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
« no previous file with comments | « no previous file | gyp/gpu.gypi » ('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 = ctx->createTexture(desc, false, gTextureDat a.get(), 0); 87 GrTexture* texture = ctx->textureProvider()->createTexture(
88 desc, false, gTextureData.get(), 0);
88 89
89 if (!texture) { 90 if (!texture) {
90 return; 91 return;
91 } 92 }
92 SkAutoTUnref<GrTexture> au(texture); 93 SkAutoTUnref<GrTexture> au(texture);
93 94
94 // setup new clip 95 // setup new clip
95 GrClip clip(SkRect::MakeWH(2*S, 2*S)); 96 GrClip clip(SkRect::MakeWH(2*S, 2*S));
96 97
97 GrPaint paint; 98 GrPaint paint;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 }; 137 };
137 138
138 ////////////////////////////////////////////////////////////////////////////// 139 //////////////////////////////////////////////////////////////////////////////
139 140
140 static GM* MyFactory(void*) { return new TexDataGM; } 141 static GM* MyFactory(void*) { return new TexDataGM; }
141 static GMRegistry reg(MyFactory); 142 static GMRegistry reg(MyFactory);
142 143
143 } 144 }
144 145
145 #endif 146 #endif
OLDNEW
« no previous file with comments | « no previous file | gyp/gpu.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698