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

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

Issue 2041113004: sk_sp for gpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Reserve correctly. Created 4 years, 6 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/SkXfermodeImageFilter.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 SkLinearGradient_DEFINED 8 #ifndef SkLinearGradient_DEFINED
9 #define SkLinearGradient_DEFINED 9 #define SkLinearGradient_DEFINED
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 void shade4_clamp(int x, int y, SkPMColor dstC[], int count); 51 void shade4_clamp(int x, int y, SkPMColor dstC[], int count);
52 template <bool, bool> void shade4_dx_clamp(SkPMColor dstC[], int count, float fx, float dx, 52 template <bool, bool> void shade4_dx_clamp(SkPMColor dstC[], int count, float fx, float dx,
53 float invDx, const float dith er[2]); 53 float invDx, const float dith er[2]);
54 54
55 typedef SkGradientShaderBase::GradientShaderBaseContext INHERITED; 55 typedef SkGradientShaderBase::GradientShaderBaseContext INHERITED;
56 }; 56 };
57 57
58 GradientType asAGradient(GradientInfo* info) const override; 58 GradientType asAGradient(GradientInfo* info) const override;
59 #if SK_SUPPORT_GPU 59 #if SK_SUPPORT_GPU
60 const GrFragmentProcessor* asFragmentProcessor(GrContext*, 60 sk_sp<GrFragmentProcessor> asFragmentProcessor(GrContext*,
61 const SkMatrix& viewM, 61 const SkMatrix& viewM,
62 const SkMatrix*, 62 const SkMatrix*,
63 SkFilterQuality, 63 SkFilterQuality,
64 SkSourceGammaTreatment) const override; 64 SkSourceGammaTreatment) const override;
65 #endif 65 #endif
66 66
67 SK_TO_STRING_OVERRIDE() 67 SK_TO_STRING_OVERRIDE()
68 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLinearGradient) 68 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLinearGradient)
69 69
70 protected: 70 protected:
71 SkLinearGradient(SkReadBuffer& buffer); 71 SkLinearGradient(SkReadBuffer& buffer);
72 void flatten(SkWriteBuffer& buffer) const override; 72 void flatten(SkWriteBuffer& buffer) const override;
73 size_t onContextSize(const ContextRec&) const override; 73 size_t onContextSize(const ContextRec&) const override;
74 Context* onCreateContext(const ContextRec&, void* storage) const override; 74 Context* onCreateContext(const ContextRec&, void* storage) const override;
75 75
76 private: 76 private:
77 class LinearGradient4fContext; 77 class LinearGradient4fContext;
78 78
79 friend class SkGradientShader; 79 friend class SkGradientShader;
80 typedef SkGradientShaderBase INHERITED; 80 typedef SkGradientShaderBase INHERITED;
81 const SkPoint fStart; 81 const SkPoint fStart;
82 const SkPoint fEnd; 82 const SkPoint fEnd;
83 }; 83 };
84 84
85 #endif 85 #endif
OLDNEW
« no previous file with comments | « src/effects/SkXfermodeImageFilter.cpp ('k') | src/effects/gradients/SkLinearGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698