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

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

Issue 563563002: make set3DMask virtual, so we can safely notify the shadercontext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: ad gm Created 6 years, 3 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/SkBlitter.cpp ('k') | no next file » | 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 SkFilterShader_DEFINED 8 #ifndef SkFilterShader_DEFINED
9 #define SkFilterShader_DEFINED 9 #define SkFilterShader_DEFINED
10 10
(...skipping 12 matching lines...) Expand all
23 public: 23 public:
24 // Takes ownership of shaderContext and calls its destructor. 24 // Takes ownership of shaderContext and calls its destructor.
25 FilterShaderContext(const SkFilterShader&, SkShader::Context*, const Con textRec&); 25 FilterShaderContext(const SkFilterShader&, SkShader::Context*, const Con textRec&);
26 virtual ~FilterShaderContext(); 26 virtual ~FilterShaderContext();
27 27
28 virtual uint32_t getFlags() const SK_OVERRIDE; 28 virtual uint32_t getFlags() const SK_OVERRIDE;
29 29
30 virtual void shadeSpan(int x, int y, SkPMColor[], int count) SK_OVERRIDE ; 30 virtual void shadeSpan(int x, int y, SkPMColor[], int count) SK_OVERRIDE ;
31 virtual void shadeSpan16(int x, int y, uint16_t[], int count) SK_OVERRID E; 31 virtual void shadeSpan16(int x, int y, uint16_t[], int count) SK_OVERRID E;
32 32
33 virtual void set3DMask(const SkMask* mask) SK_OVERRIDE {
34 // forward to our proxy
35 fShaderContext->set3DMask(mask);
36 }
37
33 private: 38 private:
34 SkShader::Context* fShaderContext; 39 SkShader::Context* fShaderContext;
35 40
36 typedef SkShader::Context INHERITED; 41 typedef SkShader::Context INHERITED;
37 }; 42 };
38 43
39 SK_TO_STRING_OVERRIDE() 44 SK_TO_STRING_OVERRIDE()
40 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkFilterShader) 45 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkFilterShader)
41 46
42 protected: 47 protected:
43 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING 48 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
44 SkFilterShader(SkReadBuffer&); 49 SkFilterShader(SkReadBuffer&);
45 #endif 50 #endif
46 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; 51 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
47 virtual Context* onCreateContext(const ContextRec&, void* storage) const SK_ OVERRIDE; 52 virtual Context* onCreateContext(const ContextRec&, void* storage) const SK_ OVERRIDE;
48 53
49 54
50 private: 55 private:
51 SkShader* fShader; 56 SkShader* fShader;
52 SkColorFilter* fFilter; 57 SkColorFilter* fFilter;
53 58
54 typedef SkShader INHERITED; 59 typedef SkShader INHERITED;
55 }; 60 };
56 61
57 #endif 62 #endif
OLDNEW
« no previous file with comments | « src/core/SkBlitter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698