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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/LoggingCanvas.cpp

Issue 2572833002: stop using exotic clipops (Closed)
Patch Set: cleaner SkUserConfig.h edit Created 4 years 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 | « skia/config/SkUserConfig.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 (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 scalarsArray->pushDouble(scalars[i]); 492 scalarsArray->pushDouble(scalars[i]);
493 return scalarsArray; 493 return scalarsArray;
494 } 494 }
495 495
496 String clipOpName(SkClipOp op) { 496 String clipOpName(SkClipOp op) {
497 switch (op) { 497 switch (op) {
498 case SkClipOp::kDifference: 498 case SkClipOp::kDifference:
499 return "kDifference_Op"; 499 return "kDifference_Op";
500 case SkClipOp::kIntersect: 500 case SkClipOp::kIntersect:
501 return "kIntersect_Op"; 501 return "kIntersect_Op";
502 case SkClipOp::kUnion:
503 return "kUnion_Op";
504 case SkClipOp::kXOR:
505 return "kXOR_Op";
506 case SkClipOp::kReverseDifference:
507 return "kReverseDifference_Op";
508 case SkClipOp::kReplace:
509 return "kReplace_Op";
510 default: 502 default:
511 return "Unknown type"; 503 return "Unknown type";
512 }; 504 };
513 } 505 }
514 506
515 String saveLayerFlagsToString(SkCanvas::SaveLayerFlags flags) { 507 String saveLayerFlagsToString(SkCanvas::SaveLayerFlags flags) {
516 String flagsString = ""; 508 String flagsString = "";
517 if (flags & SkCanvas::kIsOpaque_SaveLayerFlag) 509 if (flags & SkCanvas::kIsOpaque_SaveLayerFlag)
518 flagsString.append("kIsOpaque_SaveLayerFlag "); 510 flagsString.append("kIsOpaque_SaveLayerFlag ");
519 if (flags & SkCanvas::kPreserveLCDText_SaveLayerFlag) 511 if (flags & SkCanvas::kPreserveLCDText_SaveLayerFlag)
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 pictureAsJSON->setArray("operations", canvas.log()); 924 pictureAsJSON->setArray("operations", canvas.log());
933 return pictureAsJSON->toPrettyJSONString(); 925 return pictureAsJSON->toPrettyJSONString();
934 } 926 }
935 927
936 void showSkPicture(const SkPicture* picture) { 928 void showSkPicture(const SkPicture* picture) {
937 WTFLogAlways("%s\n", pictureAsDebugString(picture).utf8().data()); 929 WTFLogAlways("%s\n", pictureAsDebugString(picture).utf8().data());
938 } 930 }
939 #endif 931 #endif
940 932
941 } // namespace blink 933 } // namespace blink
OLDNEW
« no previous file with comments | « skia/config/SkUserConfig.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698