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

Side by Side Diff: gm/plus.cpp

Issue 1273613002: Revert of IWYU: 'core' target, files starting A-C. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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/pathinterior.cpp ('k') | gm/poly2poly.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"
10 9
11 DEF_SIMPLE_GM(PlusMergesAA, canvas, 256, 256) { 10 DEF_SIMPLE_GM(PlusMergesAA, canvas, 256, 256) {
12 SkPaint p; 11 SkPaint p;
13 p.setColor(SK_ColorRED); 12 p.setColor(SK_ColorRED);
14 p.setAntiAlias(true); // <-- crucial to the test that we use AA 13 p.setAntiAlias(true); // <-- crucial to the test that we use AA
15 14
16 // Draw a two red squares. 15 // Draw a two red squares.
17 canvas->drawRect(SkRect::MakeWH(100, 100), p); 16 canvas->drawRect(SkRect::MakeWH(100, 100), p);
18 canvas->drawRect(SkRect::MakeXYWH(150, 0, 100, 100), p); 17 canvas->drawRect(SkRect::MakeXYWH(150, 0, 100, 100), p);
19 18
(...skipping 16 matching lines...) Expand all
36 canvas->drawPath(bottomRight, p); 35 canvas->drawPath(bottomRight, p);
37 36
38 // Using Plus on the right should merge the AA of seam together completely c overing the red. 37 // Using Plus on the right should merge the AA of seam together completely c overing the red.
39 canvas->saveLayer(nullptr, nullptr); 38 canvas->saveLayer(nullptr, nullptr);
40 p.setXfermodeMode(SkXfermode::kPlus_Mode); 39 p.setXfermodeMode(SkXfermode::kPlus_Mode);
41 canvas->translate(150, 0); 40 canvas->translate(150, 0);
42 canvas->drawPath(upperLeft, p); 41 canvas->drawPath(upperLeft, p);
43 canvas->drawPath(bottomRight, p); 42 canvas->drawPath(bottomRight, p);
44 canvas->restore(); 43 canvas->restore();
45 } 44 }
OLDNEW
« no previous file with comments | « gm/pathinterior.cpp ('k') | gm/poly2poly.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698