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

Side by Side Diff: src/effects/gradients/SkSweepGradient.cpp

Issue 1768433003: remove align16 calls in skhader context sizes. will handle this elsewhere as needed (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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
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 "SkSweepGradient.h" 9 #include "SkSweepGradient.h"
10 10
(...skipping 28 matching lines...) Expand all
39 return SkGradientShader::CreateSweep(center.x(), center.y(), desc.fColors, d esc.fPos, 39 return SkGradientShader::CreateSweep(center.x(), center.y(), desc.fColors, d esc.fPos,
40 desc.fCount, desc.fGradFlags, desc.fLoc alMatrix); 40 desc.fCount, desc.fGradFlags, desc.fLoc alMatrix);
41 } 41 }
42 42
43 void SkSweepGradient::flatten(SkWriteBuffer& buffer) const { 43 void SkSweepGradient::flatten(SkWriteBuffer& buffer) const {
44 this->INHERITED::flatten(buffer); 44 this->INHERITED::flatten(buffer);
45 buffer.writePoint(fCenter); 45 buffer.writePoint(fCenter);
46 } 46 }
47 47
48 size_t SkSweepGradient::onContextSize(const ContextRec&) const { 48 size_t SkSweepGradient::onContextSize(const ContextRec&) const {
49 return SkAlign16(sizeof(SweepGradientContext)); 49 return sizeof(SweepGradientContext);
50 } 50 }
51 51
52 SkShader::Context* SkSweepGradient::onCreateContext(const ContextRec& rec, void* storage) const { 52 SkShader::Context* SkSweepGradient::onCreateContext(const ContextRec& rec, void* storage) const {
53 return new (storage) SweepGradientContext(*this, rec); 53 return new (storage) SweepGradientContext(*this, rec);
54 } 54 }
55 55
56 SkSweepGradient::SweepGradientContext::SweepGradientContext( 56 SkSweepGradient::SweepGradientContext::SweepGradientContext(
57 const SkSweepGradient& shader, const ContextRec& rec) 57 const SkSweepGradient& shader, const ContextRec& rec)
58 : INHERITED(shader, rec) {} 58 : INHERITED(shader, rec) {}
59 59
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 str->appendScalar(fCenter.fX); 261 str->appendScalar(fCenter.fX);
262 str->append(", "); 262 str->append(", ");
263 str->appendScalar(fCenter.fY); 263 str->appendScalar(fCenter.fY);
264 str->append(") "); 264 str->append(") ");
265 265
266 this->INHERITED::toString(str); 266 this->INHERITED::toString(str);
267 267
268 str->append(")"); 268 str->append(")");
269 } 269 }
270 #endif 270 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkRadialGradient.cpp ('k') | src/effects/gradients/SkTwoPointConicalGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698