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

Side by Side Diff: tools/debugger/SkObjectParser.cpp

Issue 2355483002: abstract name of clipping ops, to transtion to a more restricted set (Closed)
Patch Set: no need for ifdef for globals Created 4 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 | « tools/debugger/SkObjectParser.h ('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 2012 Google Inc. 2 * Copyright 2012 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 "SkObjectParser.h" 8 #include "SkObjectParser.h"
9 #include "SkData.h" 9 #include "SkData.h"
10 #include "SkFontDescriptor.h" 10 #include "SkFontDescriptor.h"
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 mRRect->append(", "); 306 mRRect->append(", ");
307 mRRect->appendScalar(radii.fY); 307 mRRect->appendScalar(radii.fY);
308 if (i < 3) { 308 if (i < 3) {
309 mRRect->append(", "); 309 mRRect->append(", ");
310 } 310 }
311 } 311 }
312 mRRect->append(")"); 312 mRRect->append(")");
313 return mRRect; 313 return mRRect;
314 } 314 }
315 315
316 SkString* SkObjectParser::RegionOpToString(SkRegion::Op op) { 316 SkString* SkObjectParser::ClipOpToString(SkCanvas::ClipOp op) {
317 SkString* mOp = new SkString("SkRegion::Op: "); 317 SkString* mOp = new SkString("SkRegion::Op: ");
318 if (op == SkRegion::kDifference_Op) { 318 if (op == SkCanvas::kDifference_Op) {
319 mOp->append("kDifference_Op"); 319 mOp->append("kDifference_Op");
320 } else if (op == SkRegion::kIntersect_Op) { 320 } else if (op == SkCanvas::kIntersect_Op) {
321 mOp->append("kIntersect_Op"); 321 mOp->append("kIntersect_Op");
322 } else if (op == SkRegion::kUnion_Op) { 322 } else if (op == SkCanvas::kUnion_Op) {
323 mOp->append("kUnion_Op"); 323 mOp->append("kUnion_Op");
324 } else if (op == SkRegion::kXOR_Op) { 324 } else if (op == SkCanvas::kXOR_Op) {
325 mOp->append("kXOR_Op"); 325 mOp->append("kXOR_Op");
326 } else if (op == SkRegion::kReverseDifference_Op) { 326 } else if (op == SkCanvas::kReverseDifference_Op) {
327 mOp->append("kReverseDifference_Op"); 327 mOp->append("kReverseDifference_Op");
328 } else if (op == SkRegion::kReplace_Op) { 328 } else if (op == SkCanvas::kReplace_Op) {
329 mOp->append("kReplace_Op"); 329 mOp->append("kReplace_Op");
330 } else { 330 } else {
331 mOp->append("Unknown Type"); 331 mOp->append("Unknown Type");
332 } 332 }
333 return mOp; 333 return mOp;
334 } 334 }
335 335
336 SkString* SkObjectParser::RegionToString(const SkRegion& region) { 336 SkString* SkObjectParser::RegionToString(const SkRegion& region) {
337 SkString* mRegion = new SkString("SkRegion: Data unavailable."); 337 SkString* mRegion = new SkString("SkRegion: Data unavailable.");
338 return mRegion; 338 return mRegion;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 } 396 }
397 break; 397 break;
398 } 398 }
399 default: 399 default:
400 decodedText->append("Unknown text encoding."); 400 decodedText->append("Unknown text encoding.");
401 break; 401 break;
402 } 402 }
403 403
404 return decodedText; 404 return decodedText;
405 } 405 }
OLDNEW
« no previous file with comments | « tools/debugger/SkObjectParser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698