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

Side by Side Diff: experimental/fiddle/fiddle_main.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, 9 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 | « dm/DMGpuSupport.h ('k') | gm/bleed.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 2015 Google Inc. 2 * Copyright 2015 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 <stdio.h> 8 #include <stdio.h>
9 9
10 #include <GL/osmesa.h> 10 #include <GL/osmesa.h>
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 105 }
106 if (options.gpu) { 106 if (options.gpu) {
107 OSMesaContext osMesaContext = create_osmesa_context(); 107 OSMesaContext osMesaContext = create_osmesa_context();
108 SkAutoTUnref<GrContext> grContext(create_mesa_grcontext()); 108 SkAutoTUnref<GrContext> grContext(create_mesa_grcontext());
109 if (!grContext) { 109 if (!grContext) {
110 fputs("Unable to get Mesa GrContext.\n", stderr); 110 fputs("Unable to get Mesa GrContext.\n", stderr);
111 } else { 111 } else {
112 SkAutoTUnref<SkSurface> surface( 112 SkAutoTUnref<SkSurface> surface(
113 SkSurface::NewRenderTarget( 113 SkSurface::NewRenderTarget(
114 grContext, 114 grContext,
115 SkBudgeted::kNo, 115 SkSurface::kNo_Budgeted,
116 SkImageInfo::MakeN32Premul(options.size))); 116 SkImageInfo::MakeN32Premul(options.size)));
117 if (!surface) { 117 if (!surface) {
118 fputs("Unable to get render surface.\n", stderr); 118 fputs("Unable to get render surface.\n", stderr);
119 exit(1); 119 exit(1);
120 } 120 }
121 draw(surface->getCanvas()); 121 draw(surface->getCanvas());
122 gpuData.reset(encode_snapshot(surface)); 122 gpuData.reset(encode_snapshot(surface));
123 } 123 }
124 if (osMesaContext) { 124 if (osMesaContext) {
125 OSMesaDestroyContext(osMesaContext); 125 OSMesaDestroyContext(osMesaContext);
(...skipping 20 matching lines...) Expand all
146 printf("{\n"); 146 printf("{\n");
147 dump_output(rasterData, "Raster", !gpuData && !pdfData && !skpData); 147 dump_output(rasterData, "Raster", !gpuData && !pdfData && !skpData);
148 dump_output(gpuData, "Gpu", !pdfData && !skpData); 148 dump_output(gpuData, "Gpu", !pdfData && !skpData);
149 dump_output(pdfData, "Pdf", !skpData); 149 dump_output(pdfData, "Pdf", !skpData);
150 dump_output(skpData, "Skp"); 150 dump_output(skpData, "Skp");
151 printf("}\n"); 151 printf("}\n");
152 152
153 SkSafeSetNull(image); 153 SkSafeSetNull(image);
154 return 0; 154 return 0;
155 } 155 }
OLDNEW
« no previous file with comments | « dm/DMGpuSupport.h ('k') | gm/bleed.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698