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

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

Issue 25645006: Allow gradient optimization with perspective (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: updated skipped tests Created 7 years, 2 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 | « include/gpu/GrCoordTransform.h ('k') | src/effects/gradients/SkTwoPointConicalGradient.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 * 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 passed to the gradient factory rather than the array. 281 passed to the gradient factory rather than the array.
282 */ 282 */
283 static const int kMaxRandomGradientColors = 4; 283 static const int kMaxRandomGradientColors = 4;
284 static int RandomGradientParams(SkRandom* r, 284 static int RandomGradientParams(SkRandom* r,
285 SkColor colors[kMaxRandomGradientColors], 285 SkColor colors[kMaxRandomGradientColors],
286 SkScalar** stops, 286 SkScalar** stops,
287 SkShader::TileMode* tm); 287 SkShader::TileMode* tm);
288 288
289 virtual bool onIsEqual(const GrEffect& effect) const SK_OVERRIDE; 289 virtual bool onIsEqual(const GrEffect& effect) const SK_OVERRIDE;
290 290
291 const GrCoordTransform& getCoordTransform() const { return fCoordTransform; }
292
291 private: 293 private:
292 static const GrCoordSet kCoordSet = kLocal_GrCoordSet; 294 static const GrCoordSet kCoordSet = kLocal_GrCoordSet;
293 295
294 enum { 296 enum {
295 kMaxAnalyticColors = 3 // if more colors use texture 297 kMaxAnalyticColors = 3 // if more colors use texture
296 }; 298 };
297 299
298 GrCoordTransform fCoordTransform; 300 GrCoordTransform fCoordTransform;
299 GrTextureAccess fTextureAccess; 301 GrTextureAccess fTextureAccess;
300 SkScalar fYCoord; 302 SkScalar fYCoord;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 GrGLUniformManager::UniformHandle fColorStartUni; 380 GrGLUniformManager::UniformHandle fColorStartUni;
379 GrGLUniformManager::UniformHandle fColorMidUni; 381 GrGLUniformManager::UniformHandle fColorMidUni;
380 GrGLUniformManager::UniformHandle fColorEndUni; 382 GrGLUniformManager::UniformHandle fColorEndUni;
381 383
382 typedef GrGLEffect INHERITED; 384 typedef GrGLEffect INHERITED;
383 }; 385 };
384 386
385 #endif 387 #endif
386 388
387 #endif 389 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrCoordTransform.h ('k') | src/effects/gradients/SkTwoPointConicalGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698