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

Side by Side Diff: src/effects/gradients/SkGradientShaderPriv.h

Issue 264843006: create struct to hold all the params passed around for shader::context (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: address review comments 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 | Annotate | Revision Log
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/effects/gradients/SkLinearGradient.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 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkGradientShaderPriv_DEFINED 8 #ifndef SkGradientShaderPriv_DEFINED
9 #define SkGradientShaderPriv_DEFINED 9 #define SkGradientShaderPriv_DEFINED
10 10
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 static void initCache16(GradientShaderCache* cache); 135 static void initCache16(GradientShaderCache* cache);
136 static void initCache32(GradientShaderCache* cache); 136 static void initCache32(GradientShaderCache* cache);
137 137
138 static void Build16bitCache(uint16_t[], SkColor c0, SkColor c1, int coun t); 138 static void Build16bitCache(uint16_t[], SkColor c0, SkColor c1, int coun t);
139 static void Build32bitCache(SkPMColor[], SkColor c0, SkColor c1, int cou nt, 139 static void Build32bitCache(SkPMColor[], SkColor c0, SkColor c1, int cou nt,
140 U8CPU alpha, uint32_t gradFlags); 140 U8CPU alpha, uint32_t gradFlags);
141 }; 141 };
142 142
143 class GradientShaderBaseContext : public SkShader::Context { 143 class GradientShaderBaseContext : public SkShader::Context {
144 public: 144 public:
145 GradientShaderBaseContext(const SkGradientShaderBase& shader, const SkBi tmap& device, 145 GradientShaderBaseContext(const SkGradientShaderBase& shader, const Cont extRec&);
146 const SkPaint& paint, const SkMatrix& matrix);
147 ~GradientShaderBaseContext() {}
148 146
149 virtual uint32_t getFlags() const SK_OVERRIDE { return fFlags; } 147 virtual uint32_t getFlags() const SK_OVERRIDE { return fFlags; }
150 148
151 protected: 149 protected:
152 SkMatrix fDstToIndex; 150 SkMatrix fDstToIndex;
153 SkMatrix::MapXYProc fDstToIndexProc; 151 SkMatrix::MapXYProc fDstToIndexProc;
154 uint8_t fDstToIndexClass; 152 uint8_t fDstToIndexClass;
155 uint8_t fFlags; 153 uint8_t fFlags;
156 154
157 SkAutoTUnref<GradientShaderCache> fCache; 155 SkAutoTUnref<GradientShaderCache> fCache;
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 GrGLUniformManager::UniformHandle fColorStartUni; 440 GrGLUniformManager::UniformHandle fColorStartUni;
443 GrGLUniformManager::UniformHandle fColorMidUni; 441 GrGLUniformManager::UniformHandle fColorMidUni;
444 GrGLUniformManager::UniformHandle fColorEndUni; 442 GrGLUniformManager::UniformHandle fColorEndUni;
445 443
446 typedef GrGLEffect INHERITED; 444 typedef GrGLEffect INHERITED;
447 }; 445 };
448 446
449 #endif 447 #endif
450 448
451 #endif 449 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/effects/gradients/SkLinearGradient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698