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

Side by Side Diff: src/gpu/GrBlend.h

Issue 22558003: Add blend optimization helpers and use to convert rect draws to clears. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: suppress warning Created 7 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 | Annotate | Revision Log
« no previous file with comments | « include/gpu/GrSurface.h ('k') | src/gpu/GrBlend.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1
2 /*
3 * Copyright 2013 Google Inc.
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
8
9 #include "GrTypes.h"
10 #include "GrColor.h"
11
12 #ifndef GrBlend_DEFINED
13 #define GrBlend_DEFINED
14
15 static inline bool GrBlendCoeffRefsSrc(GrBlendCoeff coeff) {
16 switch (coeff) {
17 case kSC_GrBlendCoeff:
18 case kISC_GrBlendCoeff:
19 case kSA_GrBlendCoeff:
20 case kISA_GrBlendCoeff:
21 return true;
22 default:
23 return false;
24 }
25 }
26
27 static inline bool GrBlendCoeffRefsDst(GrBlendCoeff coeff) {
28 switch (coeff) {
29 case kDC_GrBlendCoeff:
30 case kIDC_GrBlendCoeff:
31 case kDA_GrBlendCoeff:
32 case kIDA_GrBlendCoeff:
33 return true;
34 default:
35 return false;
36 }
37 }
38
39 GrColor GrSimplifyBlend(GrBlendCoeff* srcCoeff,
40 GrBlendCoeff* dstCoeff,
41 GrColor srcColor, uint32_t srcCompFlags,
42 GrColor dstColor, uint32_t dstCompFlags,
43 GrColor constantColor);
44
45 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrSurface.h ('k') | src/gpu/GrBlend.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698