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

Side by Side Diff: tests/TextBlobCacheTest.cpp

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 years, 3 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 | « tests/TArrayTest.cpp ('k') | tests/skia_test.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 "sk_tool_utils.h" 8 #include "sk_tool_utils.h"
9 9
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 SkAutoTUnref<SkFontStyleSet> set(fm->createStyleSet(i)); 100 SkAutoTUnref<SkFontStyleSet> set(fm->createStyleSet(i));
101 for (int j = 0; j < set->count(); ++j) { 101 for (int j = 0; j < set->count(); ++j) {
102 SkFontStyle fs; 102 SkFontStyle fs;
103 set->getStyle(j, &fs, NULL); 103 set->getStyle(j, &fs, NULL);
104 104
105 // We use a typeface which randomy returns unexpected mask formats t o fuzz 105 // We use a typeface which randomy returns unexpected mask formats t o fuzz
106 SkAutoTUnref<SkTypeface> orig(set->createTypeface(j)); 106 SkAutoTUnref<SkTypeface> orig(set->createTypeface(j));
107 if (normal) { 107 if (normal) {
108 paint.setTypeface(orig); 108 paint.setTypeface(orig);
109 } else { 109 } else {
110 SkAutoTUnref<SkTypeface> typeface(SkNEW_ARGS(SkRandomTypeface, ( orig, paint, true))); 110 SkAutoTUnref<SkTypeface> typeface(new SkRandomTypeface(orig, pai nt, true));
111 paint.setTypeface(typeface); 111 paint.setTypeface(typeface);
112 } 112 }
113 113
114 SkTextBlobBuilder builder; 114 SkTextBlobBuilder builder;
115 for (int aa = 0; aa < 2; aa++) { 115 for (int aa = 0; aa < 2; aa++) {
116 for (int subpixel = 0; subpixel < 2; subpixel++) { 116 for (int subpixel = 0; subpixel < 2; subpixel++) {
117 for (int lcd = 0; lcd < 2; lcd++) { 117 for (int lcd = 0; lcd < 2; lcd++) {
118 paint.setAntiAlias(SkToBool(aa)); 118 paint.setAntiAlias(SkToBool(aa));
119 paint.setSubpixelText(SkToBool(subpixel)); 119 paint.setSubpixelText(SkToBool(subpixel));
120 paint.setLCDRenderText(SkToBool(lcd)); 120 paint.setLCDRenderText(SkToBool(lcd));
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 } 169 }
170 170
171 DEF_GPUTEST(TextBlobAbnormal, reporter, factory) { 171 DEF_GPUTEST(TextBlobAbnormal, reporter, factory) {
172 text_blob_cache_inner(reporter, factory, 256, 256, 10, false, false); 172 text_blob_cache_inner(reporter, factory, 256, 256, 10, false, false);
173 } 173 }
174 174
175 DEF_GPUTEST(TextBlobStressAbnormal, reporter, factory) { 175 DEF_GPUTEST(TextBlobStressAbnormal, reporter, factory) {
176 text_blob_cache_inner(reporter, factory, 256, 256, 10, false, true); 176 text_blob_cache_inner(reporter, factory, 256, 256, 10, false, true);
177 } 177 }
178 #endif 178 #endif
OLDNEW
« no previous file with comments | « tests/TArrayTest.cpp ('k') | tests/skia_test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698