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

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

Issue 1287023009: Added tree structure to GrGLFragmentProcessor, i.e. GL instances (Closed) Base URL: https://skia.googlesource.com/skia@cs3_isequal_nonrecursive
Patch Set: moved onSetData from public to protected, onCreateGLInstance from public to private in subclasses Created 5 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
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/effects/gradients/SkLinearGradient.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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 }; 392 };
393 393
394 /////////////////////////////////////////////////////////////////////////////// 394 ///////////////////////////////////////////////////////////////////////////////
395 395
396 // Base class for GL gradient effects 396 // Base class for GL gradient effects
397 class GrGLGradientEffect : public GrGLFragmentProcessor { 397 class GrGLGradientEffect : public GrGLFragmentProcessor {
398 public: 398 public:
399 GrGLGradientEffect(); 399 GrGLGradientEffect();
400 virtual ~GrGLGradientEffect(); 400 virtual ~GrGLGradientEffect();
401 401
402 void setData(const GrGLProgramDataManager&, const GrProcessor&) override; 402 protected:
403 void onSetData(const GrGLProgramDataManager&, const GrProcessor&) override;
403 404
404 protected: 405 protected:
405 /** 406 /**
406 * Subclasses must call this. It will return a key for the part of the shade r code controlled 407 * Subclasses must call this. It will return a key for the part of the shade r code controlled
407 * by the base class. The subclasses must stick it in their key and then pas s it to the below 408 * by the base class. The subclasses must stick it in their key and then pas s it to the below
408 * emit* functions from their emitCode function. 409 * emit* functions from their emitCode function.
409 */ 410 */
410 static uint32_t GenBaseGradientKey(const GrProcessor&); 411 static uint32_t GenBaseGradientKey(const GrProcessor&);
411 412
412 // Emits the uniform used as the y-coord to texture samples in derived class es. Subclasses 413 // Emits the uniform used as the y-coord to texture samples in derived class es. Subclasses
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 GrGLProgramDataManager::UniformHandle fColorStartUni; 447 GrGLProgramDataManager::UniformHandle fColorStartUni;
447 GrGLProgramDataManager::UniformHandle fColorMidUni; 448 GrGLProgramDataManager::UniformHandle fColorMidUni;
448 GrGLProgramDataManager::UniformHandle fColorEndUni; 449 GrGLProgramDataManager::UniformHandle fColorEndUni;
449 450
450 typedef GrGLFragmentProcessor INHERITED; 451 typedef GrGLFragmentProcessor INHERITED;
451 }; 452 };
452 453
453 #endif 454 #endif
454 455
455 #endif 456 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/effects/gradients/SkLinearGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698