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

Side by Side Diff: src/animator/SkDrawGradient.cpp

Issue 245963010: Move SkShader::fLocalMatrix into SkShader constructor. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nit Created 6 years, 7 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 | « samplecode/SampleXfermodesBlur.cpp ('k') | src/animator/SkDrawShader.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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
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 #include "SkDrawGradient.h" 10 #include "SkDrawGradient.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 void SkDrawLinearGradient::dump(SkAnimateMaker* maker) { 168 void SkDrawLinearGradient::dump(SkAnimateMaker* maker) {
169 dumpBase(maker); 169 dumpBase(maker);
170 dumpRest(maker); 170 dumpRest(maker);
171 } 171 }
172 #endif 172 #endif
173 173
174 SkShader* SkDrawLinearGradient::getShader() { 174 SkShader* SkDrawLinearGradient::getShader() {
175 if (addPrelude() == 0 || points.count() != 4) 175 if (addPrelude() == 0 || points.count() != 4)
176 return NULL; 176 return NULL;
177 SkShader* shader = SkGradientShader::CreateLinear((SkPoint*)points.begin(), 177 SkShader* shader = SkGradientShader::CreateLinear((SkPoint*)points.begin(),
178 fColors.begin(), offsets.begin(), fColors.count(), (SkShader::TileMode) tileMode, fUnitMapper); 178 fColors.begin(), offsets.begin(), fColors.count(), (SkShader::TileMode) tileMode,
179 fUnitMapper, 0, getMatrix());
179 SkAutoTDelete<SkShader> autoDel(shader); 180 SkAutoTDelete<SkShader> autoDel(shader);
180 addPostlude(shader);
181 (void)autoDel.detach(); 181 (void)autoDel.detach();
182 return shader; 182 return shader;
183 } 183 }
184 184
185 185
186 #if SK_USE_CONDENSED_INFO == 0 186 #if SK_USE_CONDENSED_INFO == 0
187 187
188 const SkMemberInfo SkDrawRadialGradient::fInfo[] = { 188 const SkMemberInfo SkDrawRadialGradient::fInfo[] = {
189 SK_MEMBER_INHERITED, 189 SK_MEMBER_INHERITED,
190 SK_MEMBER(center, Point), 190 SK_MEMBER(center, Point),
(...skipping 12 matching lines...) Expand all
203 void SkDrawRadialGradient::dump(SkAnimateMaker* maker) { 203 void SkDrawRadialGradient::dump(SkAnimateMaker* maker) {
204 dumpBase(maker); 204 dumpBase(maker);
205 dumpRest(maker); 205 dumpRest(maker);
206 } 206 }
207 #endif 207 #endif
208 208
209 SkShader* SkDrawRadialGradient::getShader() { 209 SkShader* SkDrawRadialGradient::getShader() {
210 if (addPrelude() == 0) 210 if (addPrelude() == 0)
211 return NULL; 211 return NULL;
212 SkShader* shader = SkGradientShader::CreateRadial(center, 212 SkShader* shader = SkGradientShader::CreateRadial(center,
213 radius, fColors.begin(), offsets.begin(), fColors.count(), (SkShader::Ti leMode) tileMode, fUnitMapper); 213 radius, fColors.begin(), offsets.begin(), fColors.count(), (SkShader::Ti leMode) tileMode,
214 fUnitMapper, 0, getMatrix());
214 SkAutoTDelete<SkShader> autoDel(shader); 215 SkAutoTDelete<SkShader> autoDel(shader);
215 addPostlude(shader);
216 (void)autoDel.detach(); 216 (void)autoDel.detach();
217 return shader; 217 return shader;
218 } 218 }
OLDNEW
« no previous file with comments | « samplecode/SampleXfermodesBlur.cpp ('k') | src/animator/SkDrawShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698