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

Side by Side Diff: include/gpu/GrPaint.h

Issue 12918032: Add GrPaint stage for xfermodes. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/gpu/GrDrawState.h » ('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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef GrPaint_DEFINED 10 #ifndef GrPaint_DEFINED
(...skipping 26 matching lines...) Expand all
37 * pixel is then D' = (1-C)*D + C*(Bd*D + Bs*S). 37 * pixel is then D' = (1-C)*D + C*(Bd*D + Bs*S).
38 * 38 *
39 * Note that the coverage is applied after the blend. This is why they are compu ted as distinct 39 * Note that the coverage is applied after the blend. This is why they are compu ted as distinct
40 * values. 40 * values.
41 * 41 *
42 * TODO: Encapsulate setXfermodeColorFilter in a GrEffect and remove from GrPain t. 42 * TODO: Encapsulate setXfermodeColorFilter in a GrEffect and remove from GrPain t.
43 */ 43 */
44 class GrPaint { 44 class GrPaint {
45 public: 45 public:
46 enum { 46 enum {
47 kMaxColorStages = 2, 47 kMaxColorStages = 3,
48 kMaxCoverageStages = 1, 48 kMaxCoverageStages = 1,
49 }; 49 };
50 50
51 GrPaint() { this->reset(); } 51 GrPaint() { this->reset(); }
52 52
53 GrPaint(const GrPaint& paint) { *this = paint; } 53 GrPaint(const GrPaint& paint) { *this = paint; }
54 54
55 ~GrPaint() {} 55 ~GrPaint() {}
56 56
57 /** 57 /**
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 for (int i = 0; i < kMaxColorStages; ++i) { 298 for (int i = 0; i < kMaxColorStages; ++i) {
299 fColorStages[i].reset(); 299 fColorStages[i].reset();
300 } 300 }
301 for (int i = 0; i < kMaxCoverageStages; ++i) { 301 for (int i = 0; i < kMaxCoverageStages; ++i) {
302 fCoverageStages[i].reset(); 302 fCoverageStages[i].reset();
303 } 303 }
304 } 304 }
305 }; 305 };
306 306
307 #endif 307 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrDrawState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698