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

Side by Side Diff: gm/texdata.cpp

Issue 1734043002: Revert of Move Budgeted enum out of SkSurface, use in GrTextureProvider (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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 | « gm/surface.cpp ('k') | gm/textblobmixedsizes.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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 63 }
64 64
65 GrSurfaceDesc desc; 65 GrSurfaceDesc desc;
66 // use RT flag bit because in GL it makes the texture be bottom- up 66 // use RT flag bit because in GL it makes the texture be bottom- up
67 desc.fFlags = i ? kRenderTarget_GrSurfaceFlag : 67 desc.fFlags = i ? kRenderTarget_GrSurfaceFlag :
68 kNone_GrSurfaceFlags; 68 kNone_GrSurfaceFlags;
69 desc.fConfig = kSkia8888_GrPixelConfig; 69 desc.fConfig = kSkia8888_GrPixelConfig;
70 desc.fWidth = 2 * S; 70 desc.fWidth = 2 * S;
71 desc.fHeight = 2 * S; 71 desc.fHeight = 2 * S;
72 GrTexture* texture = ctx->textureProvider()->createTexture( 72 GrTexture* texture = ctx->textureProvider()->createTexture(
73 desc, SkBudgeted::kNo, gTextureData.get(), 0); 73 desc, false, gTextureData.get(), 0);
74 74
75 if (!texture) { 75 if (!texture) {
76 return; 76 return;
77 } 77 }
78 SkAutoTUnref<GrTexture> au(texture); 78 SkAutoTUnref<GrTexture> au(texture);
79 79
80 // setup new clip 80 // setup new clip
81 GrClip clip(SkRect::MakeWH(2*S, 2*S)); 81 GrClip clip(SkRect::MakeWH(2*S, 2*S));
82 82
83 GrPaint paint; 83 GrPaint paint;
(...skipping 26 matching lines...) Expand all
110 texture->writePixels(S, (i ? 0 : S), S, S, 110 texture->writePixels(S, (i ? 0 : S), S, S,
111 texture->config(), gTextureData.get(), 111 texture->config(), gTextureData.get(),
112 4 * stride); 112 4 * stride);
113 drawContext->drawRect(clip, paint, vm, SkRect::MakeWH(2*S, 2*S)) ; 113 drawContext->drawRect(clip, paint, vm, SkRect::MakeWH(2*S, 2*S)) ;
114 } 114 }
115 } else { 115 } else {
116 skiagm::GM::DrawGpuOnlyMessage(canvas); 116 skiagm::GM::DrawGpuOnlyMessage(canvas);
117 } 117 }
118 } 118 }
119 #endif 119 #endif
OLDNEW
« no previous file with comments | « gm/surface.cpp ('k') | gm/textblobmixedsizes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698