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

Side by Side Diff: gm/xfermodes.cpp

Issue 12393049: Added support for non-separable blending modes and fixed scalar issue (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 | include/core/SkXfermode.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 #include "gm.h" 8 #include "gm.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkShader.h" 10 #include "SkShader.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 { SkXfermode::kOverlay_Mode, "Overlay" }, 107 { SkXfermode::kOverlay_Mode, "Overlay" },
108 { SkXfermode::kDarken_Mode, "Darken" }, 108 { SkXfermode::kDarken_Mode, "Darken" },
109 { SkXfermode::kLighten_Mode, "Lighten" }, 109 { SkXfermode::kLighten_Mode, "Lighten" },
110 { SkXfermode::kColorDodge_Mode, "ColorDodge" }, 110 { SkXfermode::kColorDodge_Mode, "ColorDodge" },
111 { SkXfermode::kColorBurn_Mode, "ColorBurn" }, 111 { SkXfermode::kColorBurn_Mode, "ColorBurn" },
112 { SkXfermode::kHardLight_Mode, "HardLight" }, 112 { SkXfermode::kHardLight_Mode, "HardLight" },
113 { SkXfermode::kSoftLight_Mode, "SoftLight" }, 113 { SkXfermode::kSoftLight_Mode, "SoftLight" },
114 { SkXfermode::kDifference_Mode, "Difference" }, 114 { SkXfermode::kDifference_Mode, "Difference" },
115 { SkXfermode::kExclusion_Mode, "Exclusion" }, 115 { SkXfermode::kExclusion_Mode, "Exclusion" },
116 { SkXfermode::kMultiply_Mode, "Multiply" }, 116 { SkXfermode::kMultiply_Mode, "Multiply" },
117 { SkXfermode::kHue_Mode, "Hue" },
118 { SkXfermode::kSaturation_Mode, "Saturation" },
119 { SkXfermode::kColor_Mode, "Color" },
120 { SkXfermode::kLuminosity_Mode, "Luminosity" },
117 }; 121 };
118 122
119 const SkScalar w = SkIntToScalar(W); 123 const SkScalar w = SkIntToScalar(W);
120 const SkScalar h = SkIntToScalar(H); 124 const SkScalar h = SkIntToScalar(H);
121 SkShader* s = SkShader::CreateBitmapShader(fBG, 125 SkShader* s = SkShader::CreateBitmapShader(fBG,
122 SkShader::kRepeat_TileMode, 126 SkShader::kRepeat_TileMode,
123 SkShader::kRepeat_TileMode); 127 SkShader::kRepeat_TileMode);
124 SkMatrix m; 128 SkMatrix m;
125 m.setScale(SkIntToScalar(6), SkIntToScalar(6)); 129 m.setScale(SkIntToScalar(6), SkIntToScalar(6));
126 s->setLocalMatrix(m); 130 s->setLocalMatrix(m);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 private: 176 private:
173 typedef GM INHERITED; 177 typedef GM INHERITED;
174 }; 178 };
175 179
176 ////////////////////////////////////////////////////////////////////////////// 180 //////////////////////////////////////////////////////////////////////////////
177 181
178 static GM* MyFactory(void*) { return new XfermodesGM; } 182 static GM* MyFactory(void*) { return new XfermodesGM; }
179 static GMRegistry reg(MyFactory); 183 static GMRegistry reg(MyFactory);
180 184
181 } 185 }
OLDNEW
« no previous file with comments | « no previous file | include/core/SkXfermode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698