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

Side by Side Diff: tools/json/SkJSONRenderer.cpp

Issue 1651443002: fix for skiaserve build error (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 | « 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 2016 Google Inc. 2 * Copyright 2016 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 "SkJSONRenderer.h" 8 #include "SkJSONRenderer.h"
9 9
10 #include "SkBlurMaskFilter.h" 10 #include "SkBlurMaskFilter.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 else if (!strcmp(jsonAlign, SKJSONCANVAS_ALIGN_CENTER)) { 190 else if (!strcmp(jsonAlign, SKJSONCANVAS_ALIGN_CENTER)) {
191 textAlign = SkPaint::kCenter_Align; 191 textAlign = SkPaint::kCenter_Align;
192 } 192 }
193 else if (!strcmp(jsonAlign, SKJSONCANVAS_ALIGN_RIGHT)) { 193 else if (!strcmp(jsonAlign, SKJSONCANVAS_ALIGN_RIGHT)) {
194 textAlign = SkPaint::kRight_Align; 194 textAlign = SkPaint::kRight_Align;
195 } 195 }
196 else { 196 else {
197 SkASSERT(false); 197 SkASSERT(false);
198 textAlign = SkPaint::kLeft_Align; 198 textAlign = SkPaint::kLeft_Align;
199 } 199 }
200 result->setTextAlign(textAlign);
200 } 201 }
201 if (jsonPaint.isMember(SKJSONCANVAS_ATTRIBUTE_TEXTSIZE)) { 202 if (jsonPaint.isMember(SKJSONCANVAS_ATTRIBUTE_TEXTSIZE)) {
202 float textSize = jsonPaint[SKJSONCANVAS_ATTRIBUTE_TEXTSIZE].asFloat(); 203 float textSize = jsonPaint[SKJSONCANVAS_ATTRIBUTE_TEXTSIZE].asFloat();
203 result->setTextSize(textSize); 204 result->setTextSize(textSize);
204 } 205 }
205 if (jsonPaint.isMember(SKJSONCANVAS_ATTRIBUTE_TEXTSCALEX)) { 206 if (jsonPaint.isMember(SKJSONCANVAS_ATTRIBUTE_TEXTSCALEX)) {
206 float textScaleX = jsonPaint[SKJSONCANVAS_ATTRIBUTE_TEXTSCALEX].asFloat( ); 207 float textScaleX = jsonPaint[SKJSONCANVAS_ATTRIBUTE_TEXTSCALEX].asFloat( );
207 result->setTextScaleX(textScaleX); 208 result->setTextScaleX(textScaleX);
208 } 209 }
209 if (jsonPaint.isMember(SKJSONCANVAS_ATTRIBUTE_TEXTSKEWX)) { 210 if (jsonPaint.isMember(SKJSONCANVAS_ATTRIBUTE_TEXTSKEWX)) {
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 renderer.processCommand(commands[i], target); 451 renderer.processCommand(commands[i], target);
451 } 452 }
452 } 453 }
453 else { 454 else {
454 SkDebugf(json); 455 SkDebugf(json);
455 SkFAIL("json parse failure"); 456 SkFAIL("json parse failure");
456 } 457 }
457 } 458 }
458 459
459 } // namespace 460 } // namespace
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