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

Side by Side Diff: gm/aaclip.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 | « fuzz/FilterFuzz.cpp ('k') | gm/aarectmodes.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 2011 Google Inc. 2 * Copyright 2011 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 "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkPath.h" 10 #include "SkPath.h"
11 11
12 static void do_draw(SkCanvas* canvas, const SkRect& r) { 12 static void do_draw(SkCanvas* canvas, const SkRect& r) {
13 SkPaint paint; 13 SkPaint paint;
14 paint.setXfermodeMode(SkXfermode::kSrc_Mode); 14 paint.setBlendMode(SkBlendMode::kSrc);
15 paint.setColor(0x800000FF); 15 paint.setColor(0x800000FF);
16 canvas->drawRect(r, paint); 16 canvas->drawRect(r, paint);
17 } 17 }
18 18
19 /** 19 /**
20 * Exercise kDontClipToLayer_Legacy_SaveLayerFlag flag, which does not limit th e clip to the 20 * Exercise kDontClipToLayer_Legacy_SaveLayerFlag flag, which does not limit th e clip to the
21 * layer's bounds. Thus when a draw occurs, it can (depending on "where" it is) draw into the layer 21 * layer's bounds. Thus when a draw occurs, it can (depending on "where" it is) draw into the layer
22 * and/or draw onto the surrounding portions of the canvas, or both. 22 * and/or draw onto the surrounding portions of the canvas, or both.
23 * 23 *
24 * This GM has a 100x100 rectangle (r), which its going to draw. However first it creates a layer 24 * This GM has a 100x100 rectangle (r), which its going to draw. However first it creates a layer
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 canvas->translate(80, 10); 309 canvas->translate(80, 10);
310 this->drawAndClip(canvas, fVPath, 200, 0); 310 this->drawAndClip(canvas, fVPath, 200, 0);
311 canvas->translate(0, 200); 311 canvas->translate(0, 200);
312 this->drawAndClip(canvas, fHPath, 200, 0); 312 this->drawAndClip(canvas, fHPath, 200, 0);
313 } 313 }
314 314
315 private: 315 private:
316 typedef skiagm::GM INHERITED; 316 typedef skiagm::GM INHERITED;
317 }; 317 };
318 DEF_GM(return new ClipCubicGM;) 318 DEF_GM(return new ClipCubicGM;)
OLDNEW
« no previous file with comments | « fuzz/FilterFuzz.cpp ('k') | gm/aarectmodes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698