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

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

Issue 22340010: Refactor GrGLUniformManager::UniformHandle to initialize itself by default (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: description Created 7 years, 4 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
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 "SkTwoPointConicalGradient.h" 9 #include "SkTwoPointConicalGradient.h"
10 10
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 } 329 }
330 330
331 ///////////////////////////////////////////////////////////////////// 331 /////////////////////////////////////////////////////////////////////
332 332
333 #if SK_SUPPORT_GPU 333 #if SK_SUPPORT_GPU
334 334
335 #include "GrTBackendEffectFactory.h" 335 #include "GrTBackendEffectFactory.h"
336 336
337 // For brevity 337 // For brevity
338 typedef GrGLUniformManager::UniformHandle UniformHandle; 338 typedef GrGLUniformManager::UniformHandle UniformHandle;
339 static const UniformHandle kInvalidUniformHandle = GrGLUniformManager::kInvalidU niformHandle;
340 339
341 class GrGLConical2Gradient : public GrGLGradientEffect { 340 class GrGLConical2Gradient : public GrGLGradientEffect {
342 public: 341 public:
343 342
344 GrGLConical2Gradient(const GrBackendEffectFactory& factory, const GrDrawEffe ct&); 343 GrGLConical2Gradient(const GrBackendEffectFactory& factory, const GrDrawEffe ct&);
345 virtual ~GrGLConical2Gradient() { } 344 virtual ~GrGLConical2Gradient() { }
346 345
347 virtual void emitCode(GrGLShaderBuilder*, 346 virtual void emitCode(GrGLShaderBuilder*,
348 const GrDrawEffect&, 347 const GrDrawEffect&,
349 EffectKey, 348 EffectKey,
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 SkPaint paint; 467 SkPaint paint;
469 return shader->asNewEffect(context, paint); 468 return shader->asNewEffect(context, paint);
470 } 469 }
471 470
472 471
473 ///////////////////////////////////////////////////////////////////// 472 /////////////////////////////////////////////////////////////////////
474 473
475 GrGLConical2Gradient::GrGLConical2Gradient(const GrBackendEffectFactory& factory , 474 GrGLConical2Gradient::GrGLConical2Gradient(const GrBackendEffectFactory& factory ,
476 const GrDrawEffect& drawEffect) 475 const GrDrawEffect& drawEffect)
477 : INHERITED(factory) 476 : INHERITED(factory)
478 , fVSParamUni(kInvalidUniformHandle)
479 , fFSParamUni(kInvalidUniformHandle)
480 , fVSVaryingName(NULL) 477 , fVSVaryingName(NULL)
481 , fFSVaryingName(NULL) 478 , fFSVaryingName(NULL)
482 , fCachedCenter(SK_ScalarMax) 479 , fCachedCenter(SK_ScalarMax)
483 , fCachedRadius(-SK_ScalarMax) 480 , fCachedRadius(-SK_ScalarMax)
484 , fCachedDiffRadius(-SK_ScalarMax) { 481 , fCachedDiffRadius(-SK_ScalarMax) {
485 482
486 const GrConical2Gradient& data = drawEffect.castEffect<GrConical2Gradient>() ; 483 const GrConical2Gradient& data = drawEffect.castEffect<GrConical2Gradient>() ;
487 fIsDegenerate = data.isDegenerate(); 484 fIsDegenerate = data.isDegenerate();
488 } 485 }
489 486
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 str->appendScalar(fCenter2.fY); 753 str->appendScalar(fCenter2.fY);
757 str->append(") radius2: "); 754 str->append(") radius2: ");
758 str->appendScalar(fRadius2); 755 str->appendScalar(fRadius2);
759 str->append(" "); 756 str->append(" ");
760 757
761 this->INHERITED::toString(str); 758 this->INHERITED::toString(str);
762 759
763 str->append(")"); 760 str->append(")");
764 } 761 }
765 #endif 762 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/effects/gradients/SkTwoPointRadialGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698