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 1842753002: Style bikeshed - remove extraneous whitespace (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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/strokes.cpp ('k') | gm/tablecolorfilter.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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 const struct { 79 const struct {
80 SkPixelGeometry fGeo; 80 SkPixelGeometry fGeo;
81 const char* fLabel; 81 const char* fLabel;
82 } rec[] = { 82 } rec[] = {
83 { kUnknown_SkPixelGeometry, "Unknown" }, 83 { kUnknown_SkPixelGeometry, "Unknown" },
84 { kRGB_H_SkPixelGeometry, "RGB_H" }, 84 { kRGB_H_SkPixelGeometry, "RGB_H" },
85 { kBGR_H_SkPixelGeometry, "BGR_H" }, 85 { kBGR_H_SkPixelGeometry, "BGR_H" },
86 { kRGB_V_SkPixelGeometry, "RGB_V" }, 86 { kRGB_V_SkPixelGeometry, "RGB_V" },
87 { kBGR_V_SkPixelGeometry, "BGR_V" }, 87 { kBGR_V_SkPixelGeometry, "BGR_V" },
88 }; 88 };
89 89
90 SkScalar x = 0; 90 SkScalar x = 0;
91 for (int disallowAA = 0; disallowAA <= 1; ++disallowAA) { 91 for (int disallowAA = 0; disallowAA <= 1; ++disallowAA) {
92 for (int disallowDither = 0; disallowDither <= 1; ++disallowDither) { 92 for (int disallowDither = 0; disallowDither <= 1; ++disallowDither) {
93 SkScalar y = 0; 93 SkScalar y = 0;
94 for (size_t i = 0; i < SK_ARRAY_COUNT(rec); ++i) { 94 for (size_t i = 0; i < SK_ARRAY_COUNT(rec); ++i) {
95 auto surface(make_surface(ctx, info, rec[i].fGeo, disallowAA , disallowDither)); 95 auto surface(make_surface(ctx, info, rec[i].fGeo, disallowAA , disallowDither));
96 test_draw(surface->getCanvas(), rec[i].fLabel); 96 test_draw(surface->getCanvas(), rec[i].fLabel);
97 surface->draw(canvas, x, y, nullptr); 97 surface->draw(canvas, x, y, nullptr);
98 y += H; 98 y += H;
99 } 99 }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 SkASSERT(equal(surf->props(), surf2->props())); 149 SkASSERT(equal(surf->props(), surf2->props()));
150 150
151 sk_sp<SkImage> image2(surf2->makeImageSnapshot()); 151 sk_sp<SkImage> image2(surf2->makeImageSnapshot());
152 canvas->drawImage(image2.get(), 10 + SkIntToScalar(image->width()) + 10, 10, nullptr); 152 canvas->drawImage(image2.get(), 10 + SkIntToScalar(image->width()) + 10, 10, nullptr);
153 } 153 }
154 154
155 private: 155 private:
156 typedef GM INHERITED; 156 typedef GM INHERITED;
157 }; 157 };
158 DEF_GM( return new NewSurfaceGM ) 158 DEF_GM( return new NewSurfaceGM )
159
OLDNEW
« no previous file with comments | « gm/strokes.cpp ('k') | gm/tablecolorfilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698