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

Side by Side Diff: src/image/SkImageShader.h

Issue 2175563003: Bundle SkShader::asFragmentProcessor arguments in a struct (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix indentation to be less arbitrary Created 4 years, 5 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/gpu/SkGr.cpp ('k') | src/image/SkImageShader.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 2015 Google Inc. 2 * Copyright 2015 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 SkImageShader_DEFINED 8 #ifndef SkImageShader_DEFINED
9 #define SkImageShader_DEFINED 9 #define SkImageShader_DEFINED
10 10
11 #include "SkImage.h" 11 #include "SkImage.h"
12 #include "SkShader.h" 12 #include "SkShader.h"
13 13
14 class SkImageShader : public SkShader { 14 class SkImageShader : public SkShader {
15 public: 15 public:
16 static sk_sp<SkShader> Make(const SkImage*, TileMode tx, TileMode ty, 16 static sk_sp<SkShader> Make(const SkImage*, TileMode tx, TileMode ty,
17 const SkMatrix* localMatrix); 17 const SkMatrix* localMatrix);
18 18
19 bool isOpaque() const override; 19 bool isOpaque() const override;
20 20
21 SK_TO_STRING_OVERRIDE() 21 SK_TO_STRING_OVERRIDE()
22 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkImageShader) 22 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkImageShader)
23 23
24 #if SK_SUPPORT_GPU 24 #if SK_SUPPORT_GPU
25 sk_sp<GrFragmentProcessor> asFragmentProcessor(GrContext*, const SkMatrix& v iewM, 25 sk_sp<GrFragmentProcessor> asFragmentProcessor(const AsFPArgs&) const overri de;
26 const SkMatrix*, SkFilterQual ity,
27 SkSourceGammaTreatment) const override;
28 #endif 26 #endif
29 27
30 protected: 28 protected:
31 void flatten(SkWriteBuffer&) const override; 29 void flatten(SkWriteBuffer&) const override;
32 size_t onContextSize(const ContextRec&) const override; 30 size_t onContextSize(const ContextRec&) const override;
33 Context* onCreateContext(const ContextRec&, void* storage) const override; 31 Context* onCreateContext(const ContextRec&, void* storage) const override;
34 32
35 SkAutoTUnref<const SkImage> fImage; 33 SkAutoTUnref<const SkImage> fImage;
36 const TileMode fTileModeX; 34 const TileMode fTileModeX;
37 const TileMode fTileModeY; 35 const TileMode fTileModeY;
38 36
39 private: 37 private:
40 SkImageShader(const SkImage*, TileMode tx, TileMode ty, const SkMatrix* loca lMatrix); 38 SkImageShader(const SkImage*, TileMode tx, TileMode ty, const SkMatrix* loca lMatrix);
41 39
42 typedef SkShader INHERITED; 40 typedef SkShader INHERITED;
43 }; 41 };
44 42
45 #endif 43 #endif
OLDNEW
« no previous file with comments | « src/gpu/SkGr.cpp ('k') | src/image/SkImageShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698