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

Side by Side Diff: src/effects/gradients/SkRadialGradient.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 | « src/effects/gradients/SkRadialGradient.h ('k') | src/effects/gradients/SkSweepGradient.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 2012 Google Inc. 3 * Copyright 2012 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 #include "SkRadialGradient.h" 9 #include "SkRadialGradient.h"
10 #include "SkRadialGradient_Table.h" 10 #include "SkRadialGradient_Table.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 uint16_t* SK_RESTRICT dstC, const uint16_t* SK_RE STRICT cache, 139 uint16_t* SK_RESTRICT dstC, const uint16_t* SK_RE STRICT cache,
140 int toggle, int count) { 140 int toggle, int count) {
141 shadeSpan16_radial<repeat_tileproc_nonstatic>(fx, dx, fy, dy, dstC, cache, t oggle, count); 141 shadeSpan16_radial<repeat_tileproc_nonstatic>(fx, dx, fy, dy, dstC, cache, t oggle, count);
142 } 142 }
143 143
144 } // namespace 144 } // namespace
145 145
146 ///////////////////////////////////////////////////////////////////// 146 /////////////////////////////////////////////////////////////////////
147 147
148 SkRadialGradient::SkRadialGradient(const SkPoint& center, SkScalar radius, 148 SkRadialGradient::SkRadialGradient(const SkPoint& center, SkScalar radius,
149 const Descriptor& desc) 149 const Descriptor& desc, const SkMatrix* local Matrix)
150 : SkGradientShaderBase(desc), 150 : SkGradientShaderBase(desc, localMatrix),
151 fCenter(center), 151 fCenter(center),
152 fRadius(radius) 152 fRadius(radius)
153 { 153 {
154 // make sure our table is insync with our current #define for kSQRT_TABLE_SI ZE 154 // make sure our table is insync with our current #define for kSQRT_TABLE_SI ZE
155 SkASSERT(sizeof(gSqrt8Table) == kSQRT_TABLE_SIZE); 155 SkASSERT(sizeof(gSqrt8Table) == kSQRT_TABLE_SIZE);
156 156
157 rad_to_unit_matrix(center, radius, &fPtsToUnit); 157 rad_to_unit_matrix(center, radius, &fPtsToUnit);
158 } 158 }
159 159
160 size_t SkRadialGradient::contextSize() const { 160 size_t SkRadialGradient::contextSize() const {
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 str->appendScalar(fCenter.fY); 595 str->appendScalar(fCenter.fY);
596 str->append(") radius: "); 596 str->append(") radius: ");
597 str->appendScalar(fRadius); 597 str->appendScalar(fRadius);
598 str->append(" "); 598 str->append(" ");
599 599
600 this->INHERITED::toString(str); 600 this->INHERITED::toString(str);
601 601
602 str->append(")"); 602 str->append(")");
603 } 603 }
604 #endif 604 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkRadialGradient.h ('k') | src/effects/gradients/SkSweepGradient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698