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

Side by Side Diff: tests/TextBlobCacheTest.cpp

Issue 1682083002: Remove SkNEW_APPEND_TO_TARRAY. (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 | « src/gpu/glsl/GrGLSLGeometryProcessor.cpp ('k') | no next file » | 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 paint.setTextSize(160); 119 paint.setTextSize(160);
120 } 120 }
121 const SkTextBlobBuilder::RunBuffer& run = builder.allocR un(paint, 121 const SkTextBlobBuilder::RunBuffer& run = builder.allocR un(paint,
122 maxTotalText, 122 maxTotalText,
123 0, 0, 123 0, 0,
124 nullptr); 124 nullptr);
125 memcpy(run.glyphs, text.get(), maxTotalText * sizeof(uin t16_t)); 125 memcpy(run.glyphs, text.get(), maxTotalText * sizeof(uin t16_t));
126 } 126 }
127 } 127 }
128 } 128 }
129 SkNEW_APPEND_TO_TARRAY(&blobs, TextBlobWrapper, (builder.build())); 129 blobs.emplace_back(builder.build());
130 } 130 }
131 } 131 }
132 132
133 // create surface where LCD is impossible 133 // create surface where LCD is impossible
134 info = SkImageInfo::MakeN32Premul(kWidth, kHeight); 134 info = SkImageInfo::MakeN32Premul(kWidth, kHeight);
135 SkSurfaceProps propsNoLCD(0, kUnknown_SkPixelGeometry); 135 SkSurfaceProps propsNoLCD(0, kUnknown_SkPixelGeometry);
136 SkAutoTUnref<SkSurface> surfaceNoLCD(canvas->newSurface(info, &propsNoLCD)); 136 SkAutoTUnref<SkSurface> surfaceNoLCD(canvas->newSurface(info, &propsNoLCD));
137 REPORTER_ASSERT(reporter, surface); 137 REPORTER_ASSERT(reporter, surface);
138 if (!surface) { 138 if (!surface) {
139 return; 139 return;
(...skipping 26 matching lines...) Expand all
166 } 166 }
167 167
168 DEF_GPUTEST_FOR_NULL_CONTEXT(TextBlobAbnormal, reporter, context) { 168 DEF_GPUTEST_FOR_NULL_CONTEXT(TextBlobAbnormal, reporter, context) {
169 text_blob_cache_inner(reporter, context, 256, 256, 10, false, false); 169 text_blob_cache_inner(reporter, context, 256, 256, 10, false, false);
170 } 170 }
171 171
172 DEF_GPUTEST_FOR_NULL_CONTEXT(TextBlobStressAbnormal, reporter, context) { 172 DEF_GPUTEST_FOR_NULL_CONTEXT(TextBlobStressAbnormal, reporter, context) {
173 text_blob_cache_inner(reporter, context, 256, 256, 10, false, true); 173 text_blob_cache_inner(reporter, context, 256, 256, 10, false, true);
174 } 174 }
175 #endif 175 #endif
OLDNEW
« no previous file with comments | « src/gpu/glsl/GrGLSLGeometryProcessor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698