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

Side by Side Diff: tests/TessellatingPathRendererTests.cpp

Issue 1086393004: Yet more ASAN fixes. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 | « tests/SurfaceTest.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 "SkPath.h" 8 #include "SkPath.h"
9 9
10 #if SK_SUPPORT_GPU 10 #if SK_SUPPORT_GPU
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 static void test_path(GrDrawTarget* dt, GrRenderTarget* rt, const SkPath& path) { 235 static void test_path(GrDrawTarget* dt, GrRenderTarget* rt, const SkPath& path) {
236 GrTessellatingPathRenderer tess; 236 GrTessellatingPathRenderer tess;
237 GrPipelineBuilder pipelineBuilder; 237 GrPipelineBuilder pipelineBuilder;
238 pipelineBuilder.setRenderTarget(rt); 238 pipelineBuilder.setRenderTarget(rt);
239 SkStrokeRec stroke(SkStrokeRec::kFill_InitStyle); 239 SkStrokeRec stroke(SkStrokeRec::kFill_InitStyle);
240 tess.drawPath(dt, &pipelineBuilder, SK_ColorWHITE, SkMatrix::I(), path, stro ke, false); 240 tess.drawPath(dt, &pipelineBuilder, SK_ColorWHITE, SkMatrix::I(), path, stro ke, false);
241 } 241 }
242 242
243 DEF_GPUTEST(TessellatingPathRendererTests, reporter, factory) { 243 DEF_GPUTEST(TessellatingPathRendererTests, reporter, factory) {
244 GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp e>(0)); 244 GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp e>(0));
245 if (!context) { 245 if (NULL == context) {
246 return; 246 return;
247 } 247 }
248 GrSurfaceDesc desc; 248 GrSurfaceDesc desc;
249 desc.fFlags = kRenderTarget_GrSurfaceFlag; 249 desc.fFlags = kRenderTarget_GrSurfaceFlag;
250 desc.fWidth = 800; 250 desc.fWidth = 800;
251 desc.fHeight = 800; 251 desc.fHeight = 800;
252 desc.fConfig = kSkia8888_GrPixelConfig; 252 desc.fConfig = kSkia8888_GrPixelConfig;
253 desc.fOrigin = kTopLeft_GrSurfaceOrigin; 253 desc.fOrigin = kTopLeft_GrSurfaceOrigin;
254 SkAutoTUnref<GrTexture> texture( 254 SkAutoTUnref<GrTexture> texture(
255 context->refScratchTexture(desc, GrContext::kExact_ScratchTexMatch) 255 context->refScratchTexture(desc, GrContext::kExact_ScratchTexMatch)
(...skipping 14 matching lines...) Expand all
270 test_path(dt, rt, create_path_8()); 270 test_path(dt, rt, create_path_8());
271 test_path(dt, rt, create_path_9()); 271 test_path(dt, rt, create_path_9());
272 test_path(dt, rt, create_path_10()); 272 test_path(dt, rt, create_path_10());
273 test_path(dt, rt, create_path_11()); 273 test_path(dt, rt, create_path_11());
274 test_path(dt, rt, create_path_12()); 274 test_path(dt, rt, create_path_12());
275 test_path(dt, rt, create_path_13()); 275 test_path(dt, rt, create_path_13());
276 test_path(dt, rt, create_path_14()); 276 test_path(dt, rt, create_path_14());
277 test_path(dt, rt, create_path_15()); 277 test_path(dt, rt, create_path_15());
278 } 278 }
279 #endif 279 #endif
OLDNEW
« no previous file with comments | « tests/SurfaceTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698