OLD | NEW |
---|---|
(Empty) | |
1 /* | |
2 * Copyright 2014 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 SkPictureShader_DEFINED | |
9 #define SkPictureShader_DEFINED | |
10 | |
11 #include "SkShader.h" | |
12 | |
13 class SkBitmap; | |
14 class SkPicture; | |
15 | |
robertphillips
2014/04/02 18:15:35
// The SkPictureShader ...
f(malita)
2014/04/07 15:06:24
Done.
| |
16 class SkPictureShader : public SkShader { | |
reed1
2014/04/07 14:03:15
Defensively, lets keep this private, and just expo
f(malita)
2014/04/07 15:06:24
Done.
| |
17 public: | |
18 SkPictureShader(SkPicture*, TileMode, TileMode); | |
19 virtual ~SkPictureShader(); | |
20 | |
21 virtual bool setContext(const SkBitmap&, const SkPaint&, const SkMatrix&) SK _OVERRIDE; | |
22 virtual void endContext() SK_OVERRIDE; | |
23 virtual uint32_t getFlags() SK_OVERRIDE; | |
24 | |
25 virtual ShadeProc asAShadeProc(void** ctx) SK_OVERRIDE; | |
26 virtual void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVERRID E; | |
27 virtual void shadeSpan16(int x, int y, uint16_t dstC[], int count) SK_OVERRI DE; | |
28 | |
29 SK_TO_STRING_OVERRIDE() | |
30 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPictureShader) | |
31 | |
32 #if SK_SUPPORT_GPU | |
33 GrEffectRef* asNewEffect(GrContext*, const SkPaint&) const SK_OVERRIDE; | |
34 #endif | |
35 | |
36 protected: | |
37 SkPictureShader(SkReadBuffer&); | |
38 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; | |
39 | |
40 private: | |
41 bool buildBitmapShader(const SkMatrix&) const; | |
42 | |
robertphillips
2014/04/02 18:15:35
this should go last.
f(malita)
2014/04/07 15:06:24
Done.
| |
43 typedef SkShader INHERITED; | |
44 | |
45 SkPicture* fPicture; | |
46 TileMode fTmx, fTmy; | |
47 | |
48 mutable SkAutoTUnref<SkShader> fCachedShader; | |
49 mutable SkSize fCachedTileScale; | |
50 }; | |
51 | |
52 #endif // SkPictureShader_DEFINED | |
OLD | NEW |