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

Side by Side Diff: gm/plus.cpp

Issue 2396953002: Revert[8] "replace SkXfermode obj with SkBlendMode enum in paints" (Closed)
Patch Set: add tmp virtual to unroll legacy arithmodes Created 4 years, 2 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 | « gm/picture.cpp ('k') | gm/srcmode.cpp » ('j') | 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 "gm.h" 8 #include "gm.h"
9 #include "SkPath.h" 9 #include "SkPath.h"
10 10
(...skipping 19 matching lines...) Expand all
30 bottomRight.lineTo(100, 100); 30 bottomRight.lineTo(100, 100);
31 bottomRight.lineTo(0, 100); 31 bottomRight.lineTo(0, 100);
32 bottomRight.lineTo(100, 0); 32 bottomRight.lineTo(100, 0);
33 33
34 // The left square is drawn simply with SrcOver. It will show a red seam. 34 // The left square is drawn simply with SrcOver. It will show a red seam.
35 canvas->drawPath(upperLeft, p); 35 canvas->drawPath(upperLeft, p);
36 canvas->drawPath(bottomRight, p); 36 canvas->drawPath(bottomRight, p);
37 37
38 // Using Plus on the right should merge the AA of seam together completely c overing the red. 38 // Using Plus on the right should merge the AA of seam together completely c overing the red.
39 canvas->saveLayer(nullptr, nullptr); 39 canvas->saveLayer(nullptr, nullptr);
40 p.setXfermodeMode(SkXfermode::kPlus_Mode); 40 p.setBlendMode(SkBlendMode::kPlus);
41 canvas->translate(150, 0); 41 canvas->translate(150, 0);
42 canvas->drawPath(upperLeft, p); 42 canvas->drawPath(upperLeft, p);
43 canvas->drawPath(bottomRight, p); 43 canvas->drawPath(bottomRight, p);
44 canvas->restore(); 44 canvas->restore();
45 } 45 }
OLDNEW
« no previous file with comments | « gm/picture.cpp ('k') | gm/srcmode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698