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

Side by Side Diff: gm/surface.cpp

Issue 1728093005: Move Budgeted enum out of SkSurface, use in GrTextureProvider (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add aliases for Chrome 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/imagetoyuvplanes.cpp ('k') | gm/texdata.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 2014 Google Inc. 2 * Copyright 2014 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 "gm.h" 8 #include "gm.h"
9 #include "SkGradientShader.h" 9 #include "SkGradientShader.h"
10 #include "SkSurface.h" 10 #include "SkSurface.h"
(...skipping 15 matching lines...) Expand all
26 uint32_t flags = 0; 26 uint32_t flags = 0;
27 if (disallowAA) { 27 if (disallowAA) {
28 flags |= SkSurfaceProps::kDisallowAntiAlias_Flag; 28 flags |= SkSurfaceProps::kDisallowAntiAlias_Flag;
29 } 29 }
30 if (disallowDither) { 30 if (disallowDither) {
31 flags |= SkSurfaceProps::kDisallowDither_Flag; 31 flags |= SkSurfaceProps::kDisallowDither_Flag;
32 } 32 }
33 33
34 SkSurfaceProps props(flags, geo); 34 SkSurfaceProps props(flags, geo);
35 if (ctx) { 35 if (ctx) {
36 return SkSurface::NewRenderTarget(ctx, SkSurface::kNo_Budgeted, info, 0, &props); 36 return SkSurface::NewRenderTarget(ctx, SkBudgeted::kNo, info, 0, &props) ;
37 } else { 37 } else {
38 return SkSurface::NewRaster(info, &props); 38 return SkSurface::NewRaster(info, &props);
39 } 39 }
40 } 40 }
41 41
42 static void test_draw(SkCanvas* canvas, const char label[]) { 42 static void test_draw(SkCanvas* canvas, const char label[]) {
43 SkPaint paint; 43 SkPaint paint;
44 44
45 paint.setAntiAlias(true); 45 paint.setAntiAlias(true);
46 paint.setLCDRenderText(true); 46 paint.setLCDRenderText(true);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 151
152 SkAutoTUnref<SkImage> image2(surf2->newImageSnapshot()); 152 SkAutoTUnref<SkImage> image2(surf2->newImageSnapshot());
153 canvas->drawImage(image2, 10 + SkIntToScalar(image->width()) + 10, 10, n ullptr); 153 canvas->drawImage(image2, 10 + SkIntToScalar(image->width()) + 10, 10, n ullptr);
154 } 154 }
155 155
156 private: 156 private:
157 typedef GM INHERITED; 157 typedef GM INHERITED;
158 }; 158 };
159 DEF_GM( return new NewSurfaceGM ) 159 DEF_GM( return new NewSurfaceGM )
160 160
OLDNEW
« no previous file with comments | « gm/imagetoyuvplanes.cpp ('k') | gm/texdata.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698