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

Side by Side Diff: src/core/SkComposeShader.h

Issue 2037413002: Add SkSourceGammaTreatment enum so we know how to create mips (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix DM compilation 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/core/SkColorShader.cpp ('k') | src/core/SkComposeShader.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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 SkComposeShader_DEFINED 8 #ifndef SkComposeShader_DEFINED
9 #define SkComposeShader_DEFINED 9 #define SkComposeShader_DEFINED
10 10
(...skipping 20 matching lines...) Expand all
31 SkComposeShader(sk_sp<SkShader> sA, sk_sp<SkShader> sB, sk_sp<SkXfermode> mo de) 31 SkComposeShader(sk_sp<SkShader> sA, sk_sp<SkShader> sB, sk_sp<SkXfermode> mo de)
32 : fShaderA(std::move(sA)) 32 : fShaderA(std::move(sA))
33 , fShaderB(std::move(sB)) 33 , fShaderB(std::move(sB))
34 , fMode(std::move(mode)) 34 , fMode(std::move(mode))
35 {} 35 {}
36 36
37 #if SK_SUPPORT_GPU 37 #if SK_SUPPORT_GPU
38 const GrFragmentProcessor* asFragmentProcessor(GrContext*, 38 const GrFragmentProcessor* asFragmentProcessor(GrContext*,
39 const SkMatrix& viewM, 39 const SkMatrix& viewM,
40 const SkMatrix* localMatrix, 40 const SkMatrix* localMatrix,
41 SkFilterQuality) const overr ide; 41 SkFilterQuality,
42 SkSourceGammaTreatment) cons t override;
42 #endif 43 #endif
43 44
44 class ComposeShaderContext : public SkShader::Context { 45 class ComposeShaderContext : public SkShader::Context {
45 public: 46 public:
46 // When this object gets destroyed, it will call contextA and contextB's destructor 47 // When this object gets destroyed, it will call contextA and contextB's destructor
47 // but it will NOT free the memory. 48 // but it will NOT free the memory.
48 ComposeShaderContext(const SkComposeShader&, const ContextRec&, 49 ComposeShaderContext(const SkComposeShader&, const ContextRec&,
49 SkShader::Context* contextA, SkShader::Context* con textB); 50 SkShader::Context* contextA, SkShader::Context* con textB);
50 51
51 SkShader::Context* getShaderContextA() const { return fShaderContextA; } 52 SkShader::Context* getShaderContextA() const { return fShaderContextA; }
(...skipping 28 matching lines...) Expand all
80 81
81 private: 82 private:
82 sk_sp<SkShader> fShaderA; 83 sk_sp<SkShader> fShaderA;
83 sk_sp<SkShader> fShaderB; 84 sk_sp<SkShader> fShaderB;
84 sk_sp<SkXfermode> fMode; 85 sk_sp<SkXfermode> fMode;
85 86
86 typedef SkShader INHERITED; 87 typedef SkShader INHERITED;
87 }; 88 };
88 89
89 #endif 90 #endif
OLDNEW
« no previous file with comments | « src/core/SkColorShader.cpp ('k') | src/core/SkComposeShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698