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

Side by Side Diff: tools/PictureRenderingFlags.cpp

Issue 824753006: allow simple (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | 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 2013 Google Inc. 2 * Copyright 2013 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 "PictureRenderingFlags.h" 8 #include "PictureRenderingFlags.h"
9 9
10 #include "CopyTilesRenderer.h" 10 #include "CopyTilesRenderer.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 renderer.reset(SkNEW_ARGS(sk_tools::PlaybackCreationRenderer, RENDER ER_ARGS)); 132 renderer.reset(SkNEW_ARGS(sk_tools::PlaybackCreationRenderer, RENDER ER_ARGS));
133 // undocumented 133 // undocumented
134 } else if (0 == strcmp(mode, "gatherPixelRefs") && kBench_PictureTool == tool) { 134 } else if (0 == strcmp(mode, "gatherPixelRefs") && kBench_PictureTool == tool) {
135 #if SK_SUPPORT_GPU 135 #if SK_SUPPORT_GPU
136 renderer.reset(sk_tools::CreateGatherPixelRefsRenderer(grContextOpts )); 136 renderer.reset(sk_tools::CreateGatherPixelRefsRenderer(grContextOpts ));
137 #else 137 #else
138 renderer.reset(sk_tools::CreateGatherPixelRefsRenderer()); 138 renderer.reset(sk_tools::CreateGatherPixelRefsRenderer());
139 #endif 139 #endif
140 } else if (0 == strcmp(mode, "rerecord") && kRender_PictureTool == tool) { 140 } else if (0 == strcmp(mode, "rerecord") && kRender_PictureTool == tool) {
141 renderer.reset(SkNEW_ARGS(sk_tools::RecordPictureRenderer, RENDERER_ ARGS)); 141 renderer.reset(SkNEW_ARGS(sk_tools::RecordPictureRenderer, RENDERER_ ARGS));
142 // Allow 'mode' to be set to 'simple', but do not create a renderer, so we can 142 } else if (0 == strcmp(mode, "simple")) {
143 // ensure that pipe does not override a mode besides simple. The rendere r will 143 // Allow 'mode' to be set to 'simple', but do not create a renderer, so we can
144 // be created below. 144 // ensure that pipe does not override a mode besides simple. The ren derer will
145 // be created below.
145 } else { 146 } else {
146 error.printf("%s is not a valid mode for --mode\n", mode); 147 error.printf("%s is not a valid mode for --mode\n", mode);
147 return NULL; 148 return NULL;
148 } 149 }
149 } 150 }
150 151
151 if (useTiles) { 152 if (useTiles) {
152 SkASSERT(NULL == renderer); 153 SkASSERT(NULL == renderer);
153 SkAutoTUnref<sk_tools::TiledPictureRenderer> tiledRenderer; 154 SkAutoTUnref<sk_tools::TiledPictureRenderer> tiledRenderer;
154 if (isCopyMode) { 155 if (isCopyMode) {
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 if (FLAGS_pipe && sk_tools::PictureRenderer::kNone_BBoxHierarchyType != bbhType) { 355 if (FLAGS_pipe && sk_tools::PictureRenderer::kNone_BBoxHierarchyType != bbhType) {
355 error.printf("--pipe and --bbh cannot be used together\n"); 356 error.printf("--pipe and --bbh cannot be used together\n");
356 return NULL; 357 return NULL;
357 } 358 }
358 } 359 }
359 renderer->setBBoxHierarchyType(bbhType); 360 renderer->setBBoxHierarchyType(bbhType);
360 renderer->setScaleFactor(SkDoubleToScalar(FLAGS_scale)); 361 renderer->setScaleFactor(SkDoubleToScalar(FLAGS_scale));
361 362
362 return renderer.detach(); 363 return renderer.detach();
363 } 364 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698