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

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

Issue 1355863002: Revert of add ImageShader, sharing code with its Bitmap cousin (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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/image/SkImage.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
(Empty)
1 /*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef SkImageShader_DEFINED
9 #define SkImageShader_DEFINED
10
11 #include "SkImage.h"
12 #include "SkShader.h"
13
14 class SkImageShader : public SkShader {
15 public:
16 static SkShader* Create(const SkImage*, TileMode tx, TileMode ty, const SkMa trix* localMatrix);
17
18 bool isOpaque() const override;
19 size_t contextSize() const override;
20
21 SK_TO_STRING_OVERRIDE()
22 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkImageShader)
23
24 #if SK_SUPPORT_GPU
25 const GrFragmentProcessor* asFragmentProcessor(GrContext*, const SkMatrix& v iewM,
26 const SkMatrix*, SkFilterQual ity,
27 GrProcessorDataManager*) cons t override;
28 #endif
29
30 protected:
31 void flatten(SkWriteBuffer&) const override;
32 Context* onCreateContext(const ContextRec&, void* storage) const override;
33
34 SkAutoTUnref<const SkImage> fImage;
35 const TileMode fTileModeX;
36 const TileMode fTileModeY;
37
38 private:
39 SkImageShader(const SkImage*, TileMode tx, TileMode ty, const SkMatrix* loca lMatrix);
40
41 typedef SkShader INHERITED;
42 };
43
44 #endif
OLDNEW
« no previous file with comments | « src/image/SkImage.cpp ('k') | src/image/SkImageShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698