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

Side by Side Diff: include/effects/SkPerlinNoiseShader.h

Issue 768183002: Revert of Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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 | « include/effects/SkOffsetImageFilter.h ('k') | include/effects/SkPictureImageFilter.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 2013 Google Inc. 2 * Copyright 2013 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 SkPerlinNoiseShader_DEFINED 8 #ifndef SkPerlinNoiseShader_DEFINED
9 #define SkPerlinNoiseShader_DEFINED 9 #define SkPerlinNoiseShader_DEFINED
10 10
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 typedef SkShader::Context INHERITED; 96 typedef SkShader::Context INHERITED;
97 }; 97 };
98 98
99 virtual bool asFragmentProcessor(GrContext* context, const SkPaint&, const S kMatrix*, GrColor*, 99 virtual bool asFragmentProcessor(GrContext* context, const SkPaint&, const S kMatrix*, GrColor*,
100 GrFragmentProcessor**) const SK_OVERRIDE; 100 GrFragmentProcessor**) const SK_OVERRIDE;
101 101
102 SK_TO_STRING_OVERRIDE() 102 SK_TO_STRING_OVERRIDE()
103 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPerlinNoiseShader) 103 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPerlinNoiseShader)
104 104
105 protected: 105 protected:
106 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
107 SkPerlinNoiseShader(SkReadBuffer&);
108 #endif
106 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; 109 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
107 virtual Context* onCreateContext(const ContextRec&, void* storage) const SK_ OVERRIDE; 110 virtual Context* onCreateContext(const ContextRec&, void* storage) const SK_ OVERRIDE;
108 111
109 private: 112 private:
110 SkPerlinNoiseShader(SkPerlinNoiseShader::Type type, SkScalar baseFrequencyX, 113 SkPerlinNoiseShader(SkPerlinNoiseShader::Type type, SkScalar baseFrequencyX,
111 SkScalar baseFrequencyY, int numOctaves, SkScalar seed, 114 SkScalar baseFrequencyY, int numOctaves, SkScalar seed,
112 const SkISize* tileSize); 115 const SkISize* tileSize);
113 virtual ~SkPerlinNoiseShader(); 116 virtual ~SkPerlinNoiseShader();
114 117
115 const SkPerlinNoiseShader::Type fType; 118 // TODO (scroggo): Once all SkShaders are created from a factory, and we hav e removed the
116 const SkScalar fBaseFrequencyX; 119 // constructor that creates SkPerlinNoiseShader from an SkReadBuffer, severa l fields can
117 const SkScalar fBaseFrequencyY; 120 // be made constant.
118 const int fNumOctaves; 121 /*const*/ SkPerlinNoiseShader::Type fType;
119 const SkScalar fSeed; 122 /*const*/ SkScalar fBaseFrequencyX;
120 const SkISize fTileSize; 123 /*const*/ SkScalar fBaseFrequencyY;
121 const bool fStitchTiles; 124 /*const*/ int fNumOctaves;
125 /*const*/ SkScalar fSeed;
126 /*const*/ SkISize fTileSize;
127 /*const*/ bool fStitchTiles;
122 128
123 typedef SkShader INHERITED; 129 typedef SkShader INHERITED;
124 }; 130 };
125 131
126 #endif 132 #endif
OLDNEW
« no previous file with comments | « include/effects/SkOffsetImageFilter.h ('k') | include/effects/SkPictureImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698